2d-inc / Flare-Flutter

Load and get full control of your Rive files in a Flutter project using this library.
https://rive.app/
MIT License
2.55k stars 470 forks source link

FlareControls never stops #251

Closed sbarbat closed 4 years ago

sbarbat commented 4 years ago

FlareControls never stops nor triggers onCompleted()

The problem is line 84 of flare_controls.dart: if (layer.time > layer.animation.duration) { because layer.animation.duration is never lower than layer.time.

In my code fixed it with if (layer.time >= (layer.animation.duration - 0.01)) {

Any better idea on how to fix this? Or should I create a PR straight away with this solution?