Offset class
An immutable 2D floatingpoint offset.
Generally speaking, Offsets can be interpreted in two ways:

As representing a point in Cartesian space a specified distance from a separatelymaintained origin. For example, the topleft position of children in the RenderBox protocol is typically represented as an Offset from the top left of the parent box.

As a vector that can be applied to coordinates. For example, when painting a RenderObject, the parent is passed an Offset from the screen's origin which it can add to the offsets of its children to find the Offset from the screen's origin to each of the children.
Because a particular Offset can be interpreted as one sense at one time then as the other sense at a later time, the same class is used for both senses.
See also:
 Size, which represents a vector describing the size of a rectangle.
 Inheritance

 Object
 OffsetBase
 Offset
Constructors
Properties
 direction → double

The angle of this offset as radians clockwise from the positive xaxis, in
the range pi to pi, assuming positive values of the xaxis go to the
right and positive values of the yaxis go down.
no setter
 distance → double

The magnitude of the offset.
no setter
 distanceSquared → double

The square of the magnitude of the offset.
no setter
 dx → double

The x component of the offset.
no setter
 dy → double

The y component of the offset.
no setter
 hashCode → int

The hash code for this object.
no setteroverride
 isFinite → bool

Whether both components are finite (neither infinite nor NaN).
no setterinherited
 isInfinite → bool

Returns true if either component is double.infinity, and false if both
are finite (or negative infinity, or NaN).
no setterinherited
 runtimeType → Type

A representation of the runtime type of the object.
no setterinherited
Methods

noSuchMethod(
Invocation invocation) → dynamic 
Invoked when a nonexistent method or property is accessed.
inherited

scale(
double scaleX, double scaleY) → Offset 
Returns a new offset with the x component scaled by
scaleX
and the y component scaled byscaleY
. 
toString(
) → String 
A string representation of this object.
override

translate(
double translateX, double translateY) → Offset  Returns a new offset with translateX added to the x component and translateY added to the y component.
Operators

operator %(
double operand) → Offset  Modulo (remainder) operator.

operator &(
Size other) → Rect  Rectangle constructor operator.

operator *(
double operand) → Offset  Multiplication operator.

operator +(
Offset other) → Offset  Binary addition operator.

operator (
Offset other) → Offset  Binary subtraction operator.

operator /(
double operand) → Offset  Division operator.

operator <(
OffsetBase other) → bool 
Lessthan operator. Compares an Offset or Size to another Offset or
Size, and returns true if both the horizontal and vertical values of the
lefthandside operand are smaller than the horizontal and vertical values
of the righthandside operand respectively. Returns false otherwise.
inherited

operator <=(
OffsetBase other) → bool 
Lessthanorequalto operator. Compares an Offset or Size to another
Offset or Size, and returns true if both the horizontal and vertical
values of the lefthandside operand are smaller than or equal to the
horizontal and vertical values of the righthandside operand
respectively. Returns false otherwise.
inherited

operator ==(
Object other) → bool 
Compares two Offsets for equality.
override

operator >(
OffsetBase other) → bool 
Greaterthan operator. Compares an Offset or Size to another Offset
or Size, and returns true if both the horizontal and vertical values of
the lefthandside operand are bigger than the horizontal and vertical
values of the righthandside operand respectively. Returns false
otherwise.
inherited

operator >=(
OffsetBase other) → bool 
Greaterthanorequalto operator. Compares an Offset or Size to
another Offset or Size, and returns true if both the horizontal and
vertical values of the lefthandside operand are bigger than or equal to
the horizontal and vertical values of the righthandside operand
respectively. Returns false otherwise.
inherited

operator unary(
) → Offset  Unary negation operator.

operator ~/(
double operand) → Offset  Integer (truncating) division operator.