isDateAfterToday method
Returns true if this date is strictly after today (i.e., tomorrow or later).
Pass now to override the current time (useful for testing).
Implementation
@useResult
bool isDateAfterToday({DateTime? now}) {
final DateTime currentNow = now ?? DateTime.now();
final DateTime startOfToday = DateTime(
currentNow.year,
currentNow.month,
currentNow.day,
);
final DateTime endOfToday = startOfToday.add(_oneDay).subtract(_oneMicrosecond);
return isAfter(endOfToday);
}