isYesterday property
bool
get
isYesterday
Indicates whether the DateTime object represents yesterday's date.
Implementation
bool get isYesterday {
final yesterday = DateTime.now().subtract(const Duration(days: 1));
return yesterday.day == day &&
yesterday.month == month &&
yesterday.year == year;
}