An offset that's expressed as a fraction of a Size.

FractionalOffset(1.0, 0.0) represents the top right of the Size, FractionalOffset(0.0, 1.0) represents the bottom left of the Size,

Constants

bottomCenter FractionalOffset

The center point along the bottom edge.

const FractionalOffset(0.5, 1.0)
bottomLeft FractionalOffset

The bottom left corner.

const FractionalOffset(0.0, 1.0)
bottomRight FractionalOffset

The bottom right corner.

const FractionalOffset(1.0, 1.0)
center FractionalOffset

The center point, both horizontally and vertically.

const FractionalOffset(0.5, 0.5)
centerLeft FractionalOffset

The center point along the left edge.

const FractionalOffset(0.0, 0.5)
centerRight FractionalOffset

The center point along the right edge.

const FractionalOffset(1.0, 0.5)
topCenter FractionalOffset

The center point along the top edge.

const FractionalOffset(0.5, 0.0)
topLeft FractionalOffset

The top left corner.

const FractionalOffset(0.0, 0.0)
topRight FractionalOffset

The top right corner.

const FractionalOffset(1.0, 0.0)

Static Methods

lerp(FractionalOffset a, FractionalOffset b, double t) FractionalOffset

Linearly interpolate between two EdgeInsets.

Constructors

FractionalOffset(double dx, double dy)

Creates a fractional offset.

const

Properties

dx double

The distance fraction in the horizontal direction.

read-only
dy double

The distance fraction in the vertical direction.

read-only
hashCode int

read-only
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator %(double other) FractionalOffset

Computes the remainder in each dimension by the given factor.

operator *(double other) FractionalOffset

Scales the fractional offset in each dimension by the given factor.

operator +(FractionalOffset other) FractionalOffset

Returns the sum of two fractional offsets.

operator -(FractionalOffset other) FractionalOffset

Returns the difference between two fractional offsets.

operator /(double other) FractionalOffset

Divides the fractional offset in each dimension by the given factor.

operator ==(other) bool

The equality operator.

operator unary-() FractionalOffset

Returns the negation of the given fractional offset.

operator ~/(double other) FractionalOffset

Integer divides the fractional offset in each dimension by the given factor.

Methods

alongOffset(Offset other) Offset

Returns the offset that is this fraction in the direction of the given offset.

alongSize(Size other) Offset

Returns the offset that is this fraction within the given size.

inscribe(Size size, Rect rect) Rect

Returns a rect of the given size, centered at this fraction of the given rect.

toString() String

Returns a string representation of this object.

withinRect(Rect rect) Point

Returns the point that is this fraction within the given rect.

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited