isToday method

bool isToday()

Returns true if the given date is today.

Returns false if the date is null.

Implementation

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