clamp method

DatepickerDateRange? clamp({
  1. Date? min,
  2. Date? max,
})
override

Clamps the current date range to the given min and max dates. Returns null if this range has no overlap with the given date range.

This clamping applies recursively; range.clamp(max: someDate).prev.next will return the clamped date range, not the original date range.

Implementation

DatepickerDateRange? clamp({Date? min, Date? max}) =>
    _clamp(this, min: min, max: max);