jumpToSelection method

void jumpToSelection()

Jumps to the most recently selected date. Does nothing if no date is selected or the picker isn't laid out yet.

Implementation

void jumpToSelection() {
  final selected = _datePickerState?._anchorDate;
  if (selected == null) return;

  final target = _targetOffsetForDate(selected);
  if (target == null) return;

  // jump to the current Date
  _datePickerState!._controller!.jumpTo(target);
}