isTimeInFuture static method

bool isTimeInFuture(
  1. TimeOfDay time
)

Checks if a given time is in the future compared to the current time.

@param time The time to check @return true if the time is in the future, false otherwise

Implementation

static bool isTimeInFuture(TimeOfDay time) {
  final now = TimeOfDay.now();
  return time.hour > now.hour ||
      (time.hour == now.hour && time.minute > now.minute);
}