-
Notifications
You must be signed in to change notification settings - Fork 229
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
RiveAnimation.asset(...) and RiveAnimation.network(...) won't update after calling setState(). It keeps on showing the previous animation, though using "Flutter Inspector" you can see name of the next asset in the Widget's state properties.
Steps To Reproduce
For an easy to produce demonstration:
- Create a new Flutter project
- Put some "riv" assets in assets directory, with names like anim_1.riv , anim_2.riv , etc.
- Replace the
Textthat shows_counterwith:
RiveAnimation.asset( 'assets/anim_${_counter % 3 + 1}.riv', ) - Run the program
- Tap the "Add" button
- Animation doesn't change
Expected behavior
Simply, I would like to see the next animation.
If the aforementioned behavior is intended (though I have not seen any other Widget like this), what is the most straightforward way for achieving the expected result.
Device & Versions
- Device: iOS Simulator
- OS: iOS 15.5
- Flutter Version:
Flutter 3.0.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 85684f9300 (2 weeks ago) • 2022-06-30 13:22:47 -0700
Engine • revision 6ba2af10bb
Tools • Dart 2.17.5 • DevTools 2.12.2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working