rive-app / rive-flutter

Flutter runtime for Rive
https://rive.app
MIT License
1.21k stars 191 forks source link

Only runs once #74

Closed idkq closed 3 years ago

idkq commented 3 years ago

My riv is only running once after build. When I toggle:

setState(() => _controller.isActive = !_controller.isActive);

nothing happens. I can se from the console:

flutter: Animation started playing
flutter: Animation stopped playing

That is starting and stopping almost at the same time. Do I need to rewind it or something?

luigi-rosso commented 3 years ago

The SimpleAnimation will only play the animation once if it's not looping. A few ways to do this:

idkq commented 3 years ago

Awesome! Maybe add this paragraph to the docs? Very helpful!