是否是昨天 now - 当前时间,默认DateTime.now()
now
bool isYesterday([DateTime? now]) { now ??= DateTime.now(); var yesterday = now.subtract(Duration(days: 1)); return isToday(yesterday); }