olmps / memo

Memo is an open-source, programming-oriented spaced repetition software (SRS) written in Flutter.
BSD 3-Clause "New" or "Revised" License
1.83k stars 159 forks source link

Fixes iOS and Android Splash Screens #159

Closed ggirotto closed 3 years ago

ggirotto commented 3 years ago

Fixes #130

matuella commented 3 years ago

Maybe a regression issue? Loosely related: https://github.com/flutter/flutter/issues/37155

ggirotto commented 3 years ago

Why do you believe this is not an assumed solution? Using the native splash screens avoids any possible Flutter problem and it's definitely the optimal solution, since it uses the native way of handling with splash screens instead relying on Flutter framework lifecycle.

I also updated Android because now the splash screen appears faster.

I don't think that #37155 is the same issue that we're facing, since the OP reports that the app freeze at the black screen, and we just have an unexpected delay (maybe Flutter framework initialize delay, not sure)

ggirotto commented 3 years ago

I disagree this is a workaround, since it's suggested even in the Flutter docs. They state the same that I believe:

They (SplashScreen) set the stage for your application, while allowing time for the app engine to load and your app to initialize.

If there is the possibility of Flutter engine delays it initialization, we cannot rely on it Flutter to provide a solution to the problem. They also state:

Each Flutter experience in an app requires a few moments to initialize the Dart isolate that runs the code. This means that a user momentarily sees a blank screen until Flutter renders its first frame.

Which is the exactly description about this issue. They propose a "Flutter" solution that uses a Android View, which I personally believe that it's worst from the platform-related solution proposed by this PR