isThisHour method
Returns true
if the time is the same as a specific dateTime
or the current time.
特定のdateTime
もしくは現在時間と同じ時刻の場合はtrue
を返します。
Implementation
bool isThisHour([DateTime? dateTime]) {
dateTime ??= DateTime.now();
return year == dateTime.year &&
month == dateTime.month &&
day == dateTime.day &&
hour == dateTime.hour;
}