isYesterday property

bool get isYesterday

Checks if this date is yesterday.

Example:

print(DateTime.now().subtract(Duration(days: 1)).isYesterday); // true

Implementation

bool get isYesterday => isSameDay(DateTime.now().subtract(const Duration(days: 1)));