BallisticScrollActivity constructor

BallisticScrollActivity(
  1. ScrollActivityDelegate delegate,
  2. Simulation simulation,
  3. TickerProvider vsync,
  4. bool shouldIgnorePointer,
)

Creates an activity that animates a scroll view based on a simulation.

Implementation

BallisticScrollActivity(
  super.delegate,
  Simulation simulation,
  TickerProvider vsync,
  this.shouldIgnorePointer,
) {
  _controller =
      AnimationController.unbounded(
          debugLabel: kDebugMode ? objectRuntimeType(this, 'BallisticScrollActivity') : null,
          vsync: vsync,
        )
        ..addListener(_tick)
        ..animateWith(
          simulation,
        ).whenComplete(_end); // won't trigger if we dispose _controller before it completes.
}