rangeContains function
Whether or not date
is inside range
.
Inclusive, and treats a null range.start
or range.end
as unbounded.
Implementation
bool rangeContains(DateRange range, Date? date) =>
(range.start == null || date! >= range.start) &&
(range.end == null || date! <= range.end);