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

A white screen appears after splash screen instead of flutter view #71568

Closed
naamapps opened this issue Dec 2, 2020 · 5 comments
Closed

A white screen appears after splash screen instead of flutter view #71568

naamapps opened this issue Dec 2, 2020 · 5 comments

Comments

@naamapps
Copy link

naamapps commented Dec 2, 2020

Currently I'm on Android and I can't test this on iOS at the moment.
I have a custom native splash screen set to my app.
When entering the app (when it's not in memory) the splash screen appears as expected, but after a few seconds it fades out to a white screen instead of the flutter view.
Then the white screen just cuts to the flutter view.
My app is nearly done, and it has an hefty amount of widgets and code (I suspect this what causes the white screen because when creating a blank flutter project and running it, it doesn't show a white screen, even on debug mode).
Unfortunately, I can't share some code because the app is almost done as I said.
It's important to note that I have set the file launch_background.xml to show a custom logo and color.

This happens in debug mode and release mode.
When in debug mode the white screen appears for 5 seconds at least.
In release mode the white screen appears for under a second (really fast, but still noticeable).

Here is a gif showing the problem in release mode:
In the gif you can see the splash screen appears first as expected (the grey background), after that it just fades out to a white screen, and then it shows the actual flutter view.

SM-G955F_20201202165059

Flutter doctor -v [✓] Flutter (Channel stable, 1.22.3, on macOS 11.0.1 20B29, locale en-IL) • Flutter version 1.22.3 at /Users/naamapps/flutter • Framework revision 8874f21 (3 weeks ago), 2020-10-29 14:14:35 -0700 • Engine revision a1440ca392 • Dart version 2.10.3

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/naamapps/Library/Android/sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.2, Build version 12B45b
• CocoaPods version 1.9.1

[!] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.51.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.16.0

[✓] Connected device (1 available)
• SM G955F (mobile) • ce031713b9cc111e01 • android-arm64 • Android 9 (API
28)

! Doctor found issues in 1 category.

@Shivam1337
Copy link

If you are doing any user validation or any async operation before rendering the first state of the application, it causes some delay in rendering which results in white screens like this one.

@darshankawar
Copy link
Member

@naamapps
Please provide a complete minimal reproducible code sample that shows the issue you are facing.
Thanks.

@darshankawar darshankawar added in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds labels Dec 3, 2020
@naamapps
Copy link
Author

naamapps commented Dec 3, 2020

I actually found out that the package easy_localization is loading the translation assets and in the meantime it show a blank screen.
Here is the package github issue, if anyone also experience this problem.
aissat/easy_localization#267
Sorry for the inconvenience.

@naamapps naamapps closed this as completed Dec 3, 2020
@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 3, 2020
@darshankawar darshankawar removed the in triage Presently being triaged by the triage team label Dec 3, 2020
@tranvantam310
Copy link

tranvantam310 commented May 6, 2021

I fixed that bug when flow by link (only work for Android device). https://androworldblog.wordpress.com/2017/08/31/removing-blank-white-screen-before-app-start-upsplash-screen/

@github-actions
Copy link

github-actions bot commented Aug 2, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants