forward method
Starts running this animation forwards (towards the end).
Returns a TickerFuture that completes when the animation is complete.
The most recently returned TickerFuture, if any, is marked as having been canceled, meaning the future never completes and its TickerFuture.orCancel derivative future completes with a TickerCanceled error.
During the animation, status is reported as AnimationStatus.forward, which switches to AnimationStatus.completed when upperBound is reached at the end of the animation.
Implementation
TickerFuture forward({ double from }) {
assert(() {
if (duration == null) {
throw FlutterError(
'AnimationController.forward() called with no default Duration.\n'
'The "duration" property should be set, either in the constructor or later, before '
'calling the forward() function.'
);
}
return true;
}());
_direction = _AnimationDirection.forward;
if (from != null)
value = from;
return _animateToInternal(upperBound);
}