animate Lottie Composition As State
Returns a LottieAnimationState representing the progress of an animation.
This is the declarative version of rememberLottieAnimatable and LottieAnimation.
Parameters
The composition to render. This should be retrieved with rememberLottieComposition.
Whether or not the animation is currently playing. Note that the internal animation may end due to reaching the target iterations count. If that happens, the animation may stop even if this is still true. You can observe the returned LottieAnimationState.isPlaying to determine whether the underlying animation is still playing.
If isPlaying switches from false to true, restartOnPlay determines whether the progress and iteration gets reset.
A LottieClipSpec that specifies the bound the animation playback should be clipped to.
The speed the animation should play at. Numbers larger than one will speed it up. Numbers between 0 and 1 will slow it down. Numbers less than 0 will play it backwards.
The number of times the animation should repeat before stopping. It must be a positive number. LottieConstants.IterateForever can be used to repeat forever.
The behavior that this animation should have when cancelled. In most cases, you will want it to cancel immediately. However, if you have a state based transition and you want an animation to finish playing before moving on to the next one then you may want to set this to LottieCancellationBehavior.OnIterationFinish.