isToday method

bool isToday()

return true if the date is today

Implementation

bool isToday() {
  final now = DateTime.now();
  final today = DateTime(now.year, now.month, now.day);
  final currentDate = DateTime(year, month, day);
  return today.isAtSameMomentAs(currentDate);
}