onRangeClicked method

void onRangeClicked(
  1. UIEvent? event,
  2. DatepickerDateRange range
)

Implementation

void onRangeClicked(UIEvent? event, DatepickerDateRange range) {
  if (_presetSelection.isNotEmpty &&
      _presetSelection.selectedValue?.range != range) {
    _presetSelection.clear();
  }
  model.selectRange(range.clamp(min: minDate, max: maxDate));
  _controller.add(event);
}