isToday static method

bool isToday(
  1. DateTime? dateTime
)

Implementation

static bool isToday(DateTime? dateTime) {
  if (dateTime == null) return false;
  final now = DateTime.now();
  return dateTime.year == now.year &&
         dateTime.month == now.month &&
         dateTime.day == now.day;
}