flare_loading icon indicating copy to clipboard operation
flare_loading copied to clipboard

endAnimation not shown

Open JsonLinesCode opened this issue 4 years ago • 4 comments

Here is my issue : when I start my application I've made an animation looping during the loading of a future process and another animation when the future has data. So here is my code : (I've replaced my future with a simple delay but it does the same.

return Scaffold(
      backgroundColor: Colors.white,
      body: Center(
          child: FlareLoading(
        until: () => Future.delayed(Duration(seconds: 5)),
        name: 'assets/animations/ynotes.flr',
        loopAnimation: 'Load',
        endAnimation: 'Ended',
        onSuccess: (test) {
          Navigator.of(context).pushReplacement(router(homePage()));
        },
        onError: (__, _) {
          Navigator.of(context).pushReplacement(router(login()));
        },
      )

Unfortunately I can't upload my .flr file, so here is the link https://rive.app/a/modeeeeeeeeern/files/flare/ynotes/embed

JsonLinesCode avatar Apr 09 '20 09:04 JsonLinesCode

To upload your .flr file just zip it before. I can't export your .flr file as it's read only ;)

But maybe this will work better for you:

return Scaffold(
      backgroundColor: Colors.white,
      body: Center(
          child: FlareLoading(
        until: () => Future.delayed(Duration(seconds: 5)),
        name: 'assets/animations/ynotes.flr',
        startAnimation: 'Load',
        loopAnimation: 'Load',
        endAnimation: 'Ended',
        onSuccess: (test) {
          Navigator.of(context).pushReplacement(router(homePage()));
        },
        onError: (__, _) {
          Navigator.of(context).pushReplacement(router(login()));
        },
      )

Let me know :) maybe I have a bug when only loopAnimation and endAnimation are given. I'll check later

jaumard avatar Apr 09 '20 09:04 jaumard

Ok I didn't know : ynotes.zip I've tried with the startAnimation but it does exactly the same : the Load animation freezes and I'm redirected to my home page...

JsonLinesCode avatar Apr 09 '20 10:04 JsonLinesCode

Ok I'll take a look asap then, sorry for that

jaumard avatar Apr 09 '20 10:04 jaumard

The same problem, some solution.

3dluis avatar Jul 28 '20 10:07 3dluis