reverse method

TickerFuture reverse ({double from })

Starts running this animation in reverse (towards the beginning).

Returns a TickerFuture that completes when the animation is dismissed.

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.reverse, which switches to AnimationStatus.dismissed when lowerBound is reached at the end of the animation.

Implementation

TickerFuture reverse({ double from }) {
  assert(() {
    if (duration == null) {
      throw FlutterError(
        'AnimationController.reverse() called with no default Duration.\n'
        'The "duration" property should be set, either in the constructor or later, before '
        'calling the reverse() function.'
      );
    }
    return true;
  }());
  _direction = _AnimationDirection.reverse;
  if (from != null)
    value = from;
  return _animateToInternal(lowerBound);
}