Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 892
Afsal Avatar asked Oct 22 '18 13:10

Afsal


Video Answer


2 Answers

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.

like image 57
rmtmckenzie Avatar answered Oct 04 '22 00:10

rmtmckenzie


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

like image 40
Rashid Abdulla Avatar answered Oct 03 '22 23:10

Rashid Abdulla