Animation not working on splash screen
Zeynal7 opened this issue · 4 comments
I have been using this library for some time now, and it worked great. But recently I tried to add animation to splash screen - initial screen opens as splash screen and when animation ends I open another screen.
Animation works well when I run my app from computer. However, when I close and open the app from device, only single image is being shown and there is no animation. What can be the reason for this? Should I wait for some initialization?
Hello!
Is the animation set to auto-play? And is the image being shown the last frame of the animation? I'm thinking that maybe the animation plays before the application starts displaying the view.
Hi,
I think, I found the reason. Flutter takes some time to load the images from the disk. I realized it after using an image and a text. Image took some time to show up. So, whatever image loads while displaying the animation, they are being shown. Instead of image sequence, I had to use flare 2d to show an animation on splash screen. If anyone knows how to wait for images to load from the disk, I would like to know.
Thanks. Will close the issue now.
I don't know such a method but try using "WidgetsFlutterBinding.ensureInitialized();" as the first line of your code. This usually solves my initialisation problems🙂
Yes, I am using that, but it doesn't load the images, I guess.