isToday static method

bool isToday(
  1. DateTime date
)

Checks if date is today.

Implementation

static bool isToday(DateTime date) {
  final now = DateTime.now();
  return now.year == date.year &&
      now.month == date.month &&
      now.day == date.day;
}