isPast static method

bool isPast(
  1. DateTime date
)

Returns whether date is in the past (before today, time-ignored).

Implementation

static bool isPast(DateTime date) {
  final DateTime today =
      DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day);
  return DateTime(date.year, date.month, date.day).isBefore(today);
}