range static method

FCalendarController<(DateTime, DateTime)?> range({
  1. (DateTime, DateTime)? initialSelection,
  2. Predicate<DateTime>? selectable,
})

Creates a FCalendarController that allows a single range to be selected, with the given initial range.

selectable will always return true if not given.

Both the start and end dates of the range is inclusive. The selected dates are always in UTC timezone and truncated to the nearest day. Unselectable dates within the selected range are selected regardless.

Contract

Throws AssertionError if:

  • the given dates in value is not in UTC timezone.
  • the end date is less than start date.

Implementation

static FCalendarController<(DateTime, DateTime)?> range({
  (DateTime, DateTime)? initialSelection,
  Predicate<DateTime>? selectable,
}) =>
    _RangeController(initialSelection: initialSelection, selectable: selectable);