androidfluttermobile

Why aren't my Flutter variables initialied on startup


I'm facing a peculiar issue with my Flutter app. When running the release APK, the variables on my home page aren't initialized correctly on startup. However, if I navigate to another page and then return to the home page, everything is fine. This behavior doesn't occur in debug mode.

I've also noticed that the splash screen in the release APK appears for a very brief moment, almost like a flash. I suspect this might be related to the initialization issue.

Has anyone encountered a similar problem before?


Solution

  • Making a splash screen and then redircting to the app solved the problem. Also the comments of @PeterKoltai under the question are really useful