You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the Rive package in order to have some nice animations within my Flutter application and I have 2 doubts:
I have an animation where some docs gets animated. I want to play this animation on Tap of it, so I'm using OneShotAnimation. The play on tap works, however when the animation ends, it immediately gets reset to the first frame.
When I load the page, in addition, the animation is loaded from the last frame.
How to avoid those 2 problems?
@TheFe91 Regarding the OneShotAnimation, we internally reset the animation at the end of its cycle. It sounds like you want it to pause on the last frame? There are 2 approaches for this that could work:
You could use a state machine that when the animation state you want to play plays, it transitions into an idle animation of that last frame (which could be its own state) or whatever frame you want to show
Description
I am using the Rive package in order to have some nice animations within my Flutter application and I have 2 doubts:
I have an animation where some docs gets animated. I want to play this animation on Tap of it, so I'm using OneShotAnimation. The play on tap works, however when the animation ends, it immediately gets reset to the first frame.
When I load the page, in addition, the animation is loaded from the last frame.
How to avoid those 2 problems?
Device & Versions
Preview
My code
The text was updated successfully, but these errors were encountered: