Position class

A position in the terminal coordinate system.

The origin (0, 0) is at the top-left corner of the terminal. x increases to the right, y increases downward.

Constructors

Position(int x, int y)
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 column (horizontal position).
final
y int
The row (vertical position).
final

Methods

clamp(Position min, Position max) Position
Clamp this position within min and max bounds.
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 +(Position other) Position
operator -(Position other) Position
operator ==(Object other) bool
The equality operator.
override
operator unary-() Position

Constants

origin → const Position
Position at (0, 0).