isYesterday property
bool
get
isYesterday
Checks if the date is yesterday
Implementation
bool get isYesterday {
final now = DateTime.now();
final yesterday = now.subtract(const Duration(days: 1));
final localTime = toLocal();
return yesterday.year == localTime.year && yesterday.month == localTime.month && yesterday.day == localTime.day;
}