isAfter method
Checks if the nullable TimeOfDay is after another TimeOfDay.
Returns true if the current TimeOfDay instance is later in time compared to toTime.
Returns false if either the current TimeOfDay instance or toTime is null.
Implementation
bool isAfter(TimeOfDay? toTime) {
if (this == null || toTime == null) return false;
if (this!.hour > toTime.hour) {
return true;
} else if (this!.hour == toTime.hour) {
return this!.minute > toTime.minute;
} else {
return false;
}
}