Closed jay-iamin closed 3 years ago
on State decleare 2 Simple animation;
SimpleAnimation initial= SimpleAnimation('initial');
SimpleAnimation looper= SimpleAnimation('looper');
on initState add initial
at controller.
inside initState add Timer to check animation status like :
Timer(Duration(milliseconds: 400), () {
initial.isActiveChanged.addListener(() {
if (initial.isActive == false) {
log("initial anim ended ✌");
SchedulerBinding.instance.addPostFrameCallback((_) {
/// `remove initial animation and add looper `
_riveArtboard.artboard.removeController(initial);
_riveArtboard.artboard.addController(looper);
});
also you can check my code here
We've posted an example of how to use the new RiveAnimation
widget with one-shot animations, which shows how to listen for when a one-shot completes: https://help.rive.app/runtimes/playback#repeatedly-playing-a-one-shot-animation
I have 2 animations, named "initial" and "looper", "initial" runs only once and "looper" runs in a loop . How do I start "looper" animation when "initial" ends.
Thanks for your help