BallisticScrollActivity constructor
Creates an activity that animates a scroll view based on a simulation
.
The delegate
, simulation
, and vsync
arguments must not be null.
Implementation
BallisticScrollActivity(
ScrollActivityDelegate delegate,
Simulation simulation,
TickerProvider vsync,
) : super(delegate) {
_controller = AnimationController.unbounded(
debugLabel: '$runtimeType',
vsync: vsync,
)
..addListener(_tick)
..animateWith(simulation)
.whenComplete(_end); // won't trigger if we dispose _controller first
}