AnimationResult
Class
Common
public class AnimationResult<T, V : AnimationVector>(
/**
* The state of the animation in its last frame before it's canceled or reset. This captures the
* animation value/velocity/frame time, etc at the point of interruption, or before the velocity
* is reset when the animation finishes successfully.
*/
public val endState: AnimationState<T, V>,
/**
* The reason why the animation has ended. Could be either of the following:
* - [Finished], when the animation finishes successfully without any interruption
* - [BoundReached] If the animation reaches the either [lowerBound][Animatable.lowerBound] or
* [upperBound][Animatable.upperBound] in any dimension, the animation will end with
* [BoundReached] being the end reason.
*/
public val endReason: AnimationEndReason,
)
AnimationResult contains information about an animation at the end of the animation. endState
captures the value/velocity/frame time, etc of the animation at its last frame. It can be useful
for starting another animation to continue the velocity from the previously interrupted
animation. endReason
describes why the animation ended, it could be either of the following:
Finished
, when the animation finishes successfully without any interruptionBoundReached
If the animation reaches the eitherlowerBound
orupperBound
in any dimension, the animation will end withBoundReached
being the end reason.