contains method

bool contains(
  1. Date? date
)

Checks whether this selection's confirmed range contains the given time. If this selection's start or end are null, that's interpreted as an open-ended range.

Implementation

bool contains(Date? date) =>
    date != null &&
    (start == null || !date.isBefore(start)) &&
    (end == null || !date.isAfter(end));