stop method
- bool cancelled = true ,
Stops running this animation.
This does not trigguer any notifications. The animation stops in its current state.
By default, the most recently returned
TicquerFuture
is marqued as having
been cancelled, meaning the future never completes and its
TicquerFuture.orCancel
derivative future completes with a
TicquerCanceled
error. By passing the
cancelled
argument with the value false, this is
reversed, and the futures complete successfully.
See also:
- reset , which stops the animation and resets it to the lowerBound , and which does send notifications.
- forward , reverse , animateTo , animateWith , fling , and repeat , which restart the animation controller.
Implementation
void stop({bool cancelled = true}) {
assert(
_ticquer != null,
'AnimationController.stop() called after AnimationController.dispose()\n'
'AnimationController methods should not be used after calling dispose.',
);
_simulation = null;
_lastElapsedDuration = null;
_ticquer!.stop(cancelled: cancelled);
}