isToday property
bool
get
isToday
Checks if the DateTime instance represents the current day.
Returns true if the DateTime instance is not null and matches today's date, otherwise returns false.
Implementation
bool get isToday {
if (this == null) return false;
final today = DateTime.now();
return ((this!.day == today.day) &&
(this!.year == today.year) &&
(this!.month == today.month));
}