...
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
http: ^0.13.6
local_auth: ^2.1.6
rxdart: ^0.27.7
bloc: ^8.1.2
google_fonts: ^4.0.4
flutter_secure_storage: ^8.0.0
flutter_appauth: ^6.0.0
flutter_bloc: ^8.1.3
flutter_spinkit: ^5.2.0
cached_network_image: ^3.2.3
just_audio: ^0.9.33
just_audio_background: ^0.0.1-beta.10
audio_video_progress_bar: ^1.0.1
sliding_up_panel: ^2.0.0+1
flutter_native_splash: ^2.3.0
...
flutter_native_splash:
web: false
color: "#ffffff"
color_dark: "#ffffff"
image: "assets/images/Minda.png"
image_dark: "assets/images/Minda.png"
android_12:
color: "#ffffff"
color_dark: "#ffffff"
image: "assets/images/Minda.png"
image_dark: "assets/images/Minda.png"
Command to create splash screen using flutter_native_splash:
flutter clean && flutter pub get && flutter pub run flutter_native_splash:create
When the app is build, the splash screen show only white/dark screen without the image. How to make it show the image?
2
Answers
I figured out what is the issue. In AndroidManifest.xml, I set
android:theme="@style/Theme.AppCompat.DayNight"
in application and activity tag. I replace the theme toandroid:theme="@style/LaunchTheme"
in activity tag and the slash screen show up.Create
flutter_native_splash.yaml
in project file and run below codeAlso you can use this (optional)