isToday method

bool isToday([
  1. DateTime? dateTime
])

Returns true if the date is the same as a specific dateTime or the current time.

特定のdateTimeもしくは現在時間と同じ日付の場合はtrueを返します

Implementation

bool isToday([DateTime? dateTime]) {
  dateTime ??= DateTime.now();
  return year == dateTime.year &&
      month == dateTime.month &&
      day == dateTime.day;
}