简体   繁体   中英

How to remove native splash screen from flutter app?

I am using a customized Splash Screen for my flutter application (written in dart). But when I launch the application, then both native specific and customized splash screen will be loading. Now I want to remove native specific splash screen from this project. How could this possible?

That is not possible.

The native splash screen is a static image which is shown before any of the libraries in use for your app are loaded; it is shown before even the java libraries are finished loading.

The extra overhead of dart/flutter means that your application will take a little longer to load (particularly noticeable for iOS applications as an objc/swift app generally has less overhead than a Java one), so until it's all ready to go the only option is to show the native splash.

One approach you could use it to start with the native splash screen, and then have the 'flutter' one resemble it closely before animating to something else. But realistically, anything you use as a splash screen in flutter is most likely just going to be slowing down access to your app unless you have to do some sort of lengthy server communication every time the app starts.

if you're using Flutter_native_splash then follow these steps

For android, Your can goto app/src/main/res/drawable/launch_background.xml and comment on the following lines

<item>
   <bitmap android:gravity="center" android:src="@drawable/splash" />
</item>

You can remove images named splash.png from drawable files to reduce the file size

For iOS, remove all subfiles of the folder ios/Runner/Assets.xcassets/LaunchImage.imageset

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