How do I make an android splash screen for flutter?
It is really simple to create Native splash screens using this package.
https://pub.dev/packages/flutter_native_splash
add this package in your dev-dependencies
dev_dependencies:
flutter_native_splash: ^0.2.9
add the following code in your YAML file.
flutter_native_splash:
color: "#42a5f5"
image: "assets/splash.png"
and run the command
flutter pub run flutter_native_splash:create
That's all, This package will take care of all the process.
FYI: This creates native splash screens for both Android and iOS, but you can control it too. if you want to create only for Android, you can set the iOS property to false. Documentation of the Package is pretty clear.
Alexander Roumeliotis
I am a 17 year old student from Greece. In my free time I like to learn coding and play computer games. Some of the apps that I make can be found on google playstore under the upplab company name,
Updated on December 27, 2022Comments
-
Alexander Roumeliotis over 1 year
I have seen a lot of articles and youtube videos and tried everything however i cannot change the android splash screen color
drawable/launch_background.xml:
<?xml version="1.0" encoding="utf-8"?> <!-- Modify this file to customize your launch splash screen --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@color/background" /> <!-- You can insert your own image assets here --> <item> <bitmap android:gravity="center" android:src="@drawable/launch_image" /> </item> </layer-list>
values/colors.xml:
<?xml version="1.0" encoding="utf-8"?> <resources> <color name="background">#2196F3</color> </resources>
Production Build with key output:
-
Mol0ko about 3 yearsplease share
values/styles.xml
file, problems can be there
-
-
Victor Lagunas over 2 yearsI don't want use package, exist other solution?