getDateTimeDayEnd function
Returns the end of the day for time
.
time
if null uses DateTime.now .
Implementation
DateTime getDateTimeDayEnd([DateTime? time]) {
time ??= DateTime.now();
return DateTime(time.year, time.month, time.day, 23, 59, 59, 999, 0);
}