isSameDateOrAfter method

  1. @useResult
bool isSameDateOrAfter(
  1. DateTime other
)

Returns true if this date (date-only) is the same as or after other.

Compares only year/month/day — time components are ignored.

Implementation

@useResult
bool isSameDateOrAfter(DateTime other) {
  final DateTime selfDate = toDateOnly();
  final DateTime otherDate = other.toDateOnly();

  return !selfDate.isBefore(otherDate);
}