onFinish property

VoidCallback? onFinish
final

Callback is evoked after one animation cycle has finished.

By default every animation repeats infinitely. For running an animation only once you can use this callback to set run to false after the first animation cycle completed. This field is ignored when controller is provided and the animation is set to controller.repeat().

Implementation

final VoidCallback? onFinish;