Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to play "endAnimation" after the Future has resolved / before the transition to HomePage() #5

Closed
Wizzel1 opened this issue Apr 17, 2021 · 3 comments

Comments

@Wizzel1
Copy link

Wizzel1 commented Apr 17, 2021

Hi there, first of all I want to say thank you for this package.

So I am a bit confused about how to set up the splashscreen to play the "endAnimation" after the future has resolved.

Currently, I am doing it like this:

SplashScreen.callback(
        name: 'test.riv',
        startAnimation: 'Start',
        loopAnimation: 'Loop',
        endAnimation: 'End',
        until: () => Future.wait([
          MobileAds.initialize(),
          Firebase.initializeApp(),
          GetStorage.init()
        ]),
        backgroundColor: kBackGroundWhite,
        onError: (error, stacktrace) {},
        onSuccess: (data) {
          Get.to(InnerDrawerScreen());
        },
      ),

but it seems like the animation gets interrupted as soon as the future resolves. What am I doing wrong?

So to clarify I'd like this sequence -> StartAnimation - Loopanimation until future resolves - Endanimation - Transition

@jaumard
Copy link
Owner

jaumard commented Apr 17, 2021

Hello,

Depending of the time of your callback it can do StartAnimation - EndAnimation if callback is finished during the StartAnimation it should go to the end.

If that's not the case maybe you can give me your rive file to I can test a bit, maybe there is a bug

@Wizzel1
Copy link
Author

Wizzel1 commented Apr 17, 2021

Yes, you are right. I made a mistake in the animation itself. Everything works as expected now. Thanks!

@jaumard
Copy link
Owner

jaumard commented Apr 17, 2021

Cool!!! :) closing then. Don't hesitate to open an issue if there something wrong :)

@jaumard jaumard closed this as completed Apr 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants