isToday property

bool isToday

Indicates whether the DateTime object represents today's date.

Implementation

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