getDateTimeYesterday function
Returns the start of yesterday from time
.
time
if null uses DateTime.now .
Implementation
DateTime getDateTimeYesterday([DateTime? time]) {
time ??= DateTime.now();
return getDateTimeDayStart(time.subtract(Duration(days: 1)));
}