I have added the flutter_native_splash package inside my dependancies and have added this native_splash code in my pubspec.yaml file
flutter_native_splash: ^2.4.0
flutter_native_splash:
color: "#FFFFFF"
image: assets/images/Logo.png
android_12:
color: "#FFFFFF"
image: assets/images/Logo.png
android: true
ios: true
web: false
and the results when creating is also showing no errors
Building package executable... (6.0s)
Built flutter_native_splash:create.
[Android] Creating default splash images
[Android] Deleting android12splash.png
[Android] Deleting android12splash.png
[Android] Deleting android12splash.png
[Android] Deleting android12splash.png
[Android] Deleting android12splash.png
[Android] Deleting android12splash.png
[Android] Deleting android12splash.png
[Android] Deleting android12splash.png
[Android] Deleting android12splash.png
[Android] Deleting android12splash.png
[Android] Updating launch background(s) with splash image path...
[Android] - android/app/src/main/res/drawable/launch_background.xml
[Android] - android/app/src/main/res/drawable-night/launch_background.xml
[Android] - android/app/src/main/res/drawable-v21/launch_background.xml
[Android] - android/app/src/main/res/drawable-night-v21/launch_background.xml
[Android] Updating styles...
[Android] - android/app/src/main/res/values-v31/styles.xml
[Android] - android/app/src/main/res/values-night-v31/styles.xml
[Android] - android/app/src/main/res/values/styles.xml
[Android] - android/app/src/main/res/values-night/styles.xml
[iOS] Creating images
[iOS] Updating ios/Runner/Info.plist for status bar hidden/visible
ā
Native splash complete.
Now go finish building something awesome! šŖ You rock! š¤š¤©
Like the package? Please give it a š here: https://pub.dev/packages/flutter_native_splash
despite showing no errors, my native splash screen is still the default flutter splash as seen below

To resolve the default splash screen issue in Android 12, you can replace it with a transparent screen by modifying your styles.xml file. Here are the steps:
Go to android\app\src\main\res\values\styles.xml and edit the file as follows:
<resources>
<!-- Base application theme. -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Customize your theme here. -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:windowIsTranslucent">true</item> <!-- add this line -->
</style>
</resources>
Adding the line <item name="android:windowIsTranslucent">true</item> will make the splash screen transparent, resolving the issue with the default splash screen in Android 12.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With