isToday static method

bool isToday(
  1. DateTime date
)

Check if date is today

date - The date to check Returns true if date is today

Implementation

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