isYesterday method
Implementation
bool isYesterday() {
return year == DateTime.now().year &&
month == DateTime.now().month &&
day == DateTime.now().day - 1;
}
bool isYesterday() {
return year == DateTime.now().year &&
month == DateTime.now().month &&
day == DateTime.now().day - 1;
}