isToday method

bool isToday()

Check if DateTime is today

Implementation

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