loop method
Starts playing the animation in an endless loop. After reaching the end, it starts over from the beginning.
If a duration
is provided, it will be set as the
AnimationController.duration value.
The duration
applies to the length of one loop iteration.
Returns a TickerFuture that only completes when the animation get canceled.
Implementation
TickerFuture loop({Duration? duration}) {
this.duration = duration ?? this.duration;
return repeat();
}