compareTo method

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

Indicates whether this time is earlier, later or the same as another one.

  • other: The other date/time to compare this one with

A value less than zero if this time is earlier than other; zero if this time is the same as other; a value greater than zero if this time is later than other.

Implementation

@override
int compareTo(LocalTime? other) => timeSinceMidnight.inNanoseconds.compareTo(other?.timeSinceMidnight.inNanoseconds ?? 0);