run property

bool? run
final

When no custom animation controller is provided the state of the animation can be controlled via run.

Is run set to true the first animation cycle is triggered.

By default every animation repeats infinitely. For running an animation only once you can use the callback onFinish to set run to false after the first cycle completed. When run is set to false while the animation is still running, the animation is stopped at that point in time. If run is set to true again the animation is reset to the beginning. To continue the animation at the previous value you might consider using controller.

Implementation

final bool? run;