简体   繁体   中英

how can I remove the white are black screen which comes before splash screen?

when I open the app, white screen appears with icon. Then only the splash screen appears. I have already tried changing the background colour.

You can use flutter_native_splash package. You can read the setting-the-splash-screen section for details. You need to cover

flutter_native_splash:
  # This package generates native code to customize Flutter's default white native splash screen
  # with background color and splash image.
  # Customize the parameters below, and run the following command in the terminal:
  # flutter pub run flutter_native_splash:create
  # To restore Flutter's default white splash screen, run the following command in the terminal:
  # flutter pub run flutter_native_splash:remove

  # color or background_image is the only required parameter.  Use color to set the background
  # of your splash screen to a solid color.  Use background_image to set the background of your
  # splash screen to a png image.  This is useful for gradients. The image will be stretch to the
  # size of the app. Only one parameter can be used, color and background_image cannot both be set.
  color: "#42a5f5" #here the color 

Then follow run-the-package

flutter pub run flutter_native_splash:create

Flutter splash screen is built on top iOS Storyboard and Android Activity. You need to edit these files to proceed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM