compareTo method Null safety
- Object other
Compares this object to another object.
Returns a value like a Comparator when comparing
That is, it returns a negative integer if
this is ordered before
a positive integer if
this is ordered after
and zero if
other are ordered together.
other argument must be a value that is comparable to this object.
@override int compareTo(Object other) => _compareTo(other);