stop method

void stop ({bool canceled: true })

Stops running this animation.

This does not trigger any notifications. The animation stops in its current state.

By default, the most recently returned TickerFuture is marked as having been canceled, meaning the future never completes and its TickerFuture.orCancel derivative future completes with a TickerCanceled error. By passing the canceled argument with the value false, this is reversed, and the futures complete successfully.

See also:

Implementation

void stop({ bool canceled = true }) {
  _simulation = null;
  _lastElapsedDuration = null;
  _ticker.stop(canceled: canceled);
}