Tween: Combine a tween with an animation
Combine a tween with an animation
To get a concrete value for the current frame of an animation, you also need an animation to determine the current state.
evaluate the tween
Evaluate the tween at the current value of an animation.
This approach is most useful for widgets that are already listening to the animation and hence rebuilding whenever the animation changes value.
animate the tween
- You can animate the tween based on the animation.
- Rather than returning a single value, the animate function returns a new Animation that incorporates the tween.
- This approach is most useful when you want to give the newly created animation to another widget, which can then read the current value that incorporates the tween as well as listen for changes to the value.
Related concepts
→
Combine a tween with an animation
→
Semantic portal