reset method

  1. @override
void reset()
override

Resets the controller to its initial state.

Implementation

@override
void reset() {
  if (_selection case final DiscreteSelection selection?) {
    this.selection = DiscreteSelection(
      ticks: selection.ticks,
      mainAxisExtent: selection.rawExtent.total,
      extent: _initialSelection.extent,
      offset: _initialSelection.offset,
    );
  }
}