Flutter app on start it is showing white screen for few second

后端 未结 6 1519
既然无缘
既然无缘 2020-12-11 00:35

Why my flutter app showing white screen for few sec on start and how to solve this issue ?

6条回答
  •  一个人的身影
    2020-12-11 01:17

    You can use the package flutter_native_splash to add native splash screens for Android and iOS without the manual changes described in other answers.

    The package does the manual changes for you.

    1 - Depend on it:

    dev_dependencies:
      flutter_native_splash: ^0.1.4
    

    And flutter pub get

    2 - Configure your splash screen on pubspec.yaml:

    flutter_native_splash:
      image: assets/images/splash.png
      color: 42a5f5
    

    3 - Run the package

    flutter pub pub run flutter_native_splash:create
    

    Splash screens are now generated.

提交回复
热议问题