isYesterday property

bool get isYesterday

Implementation

bool get isYesterday {
  final now = DateTime.now();
  final yesterday = DateTime(now.year, now.month, now.day - 1);
  return day == yesterday.day &&
      month == yesterday.month &&
      year == yesterday.year;
}