compareTo method
Compares this time with another LocalTime.
Returns a negative number if this is earlier, positive if later, or zero if equal.
Example
final t1 = LocalTime(9, 5, 3);
final t2 = LocalTime(14, 8, 22, 70);
print(t1.compareTo(t2)); // -1
print(t2.compareTo(t1)); // 1
Implementation
@override
int compareTo(LocalTime other) {
return toMillisecondOfDay().compareTo(other.toMillisecondOfDay());
}