next method

  1. @override
DatepickerDateRange? next()
override

Tries to advance to the next item, and returns it if possible.

Implementation

@override
DatepickerDateRange? next() {
  final next = value?.range?.next;
  if (next == null) return null;
  final amt =
      daysSpanned(value!.range!.start!, next.start!, inclusive: false);
  if (_customComparisonRange != null) {
    _customComparisonRange = DatepickerDateRange.custom(
        _customComparisonRange!.start!.add(days: amt),
        _customComparisonRange!.end!.add(days: amt));
  }
  _changeValue(_withComparison(next), Action.button);
  return next;
}