isToday property

bool get isToday

Returns true if the given date is today.

Returns false if the date is null.

Implementation

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