play method

TickerFuture play({
  1. Duration? duration,
})

Starts playing the animation in forward direction.

If a duration is provided, it will be set as the AnimationController.duration value.

Returns a TickerFuture that completes when the animation ends or get canceled.

Implementation

TickerFuture play({Duration? duration}) {
  this.duration = duration ?? this.duration;
  return forward();
}