compareTo method

  1. @override
int compareTo(
  1. Offset? other
)
override

Compares the current object with another object of the same type.

other: An object to compare with this object.

A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings:

Value Meaning
< 0 This object is less than the other parameter.
0 This object is equal to other.
> 0 This object is greater than other.

Implementation

@override
int compareTo(Offset? other) => other == null ? 1 : inSeconds.compareTo(other.inSeconds);