Offset class

An immutable 2D integer offset with x and y coordinates.

Used for positioning within the terminal grid (0-based).

Constructors

Offset(int x, int y)
Creates an Offset with the given x and y coordinates.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
x int
The horizontal coordinate.
final
y int
The vertical coordinate.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator +(Offset other) Offset
Returns the sum of this offset and other.
operator -(Offset other) Offset
Returns the difference between this offset and other.
operator ==(Object other) bool
The equality operator.
override

Constants

zero → const Offset
An offset at the origin (0, 0).