Member-only story
Native Splash In Flutter
2 min readJan 28, 2022
When you open app made up of Flutter, you always get white screen for brief time. By default, during this time, the native app displays a white splash screen. So to customize this or to remove there is package called flutter native splash. This package automatically generates iOS, Android, and Web-native code for customizing this native splash screen background color and splash image. Supports dark mode, full screen, and platform-specific options.
So let’s begin:
- Install the package: flutter_native_splash as a
dev_dependencies
in pubspec.yaml file.
dev_dependencies:
flutter_native_splash: ^1.3.3
- Customize the following settings and add to the pubspec.yaml file(easier one) or can make separate file in the root directory named
flutter_native_splash.yaml
.
flutter_native_splash:
#for background color in normal mode
color: “#ffffff”
#for background image. It must be a .png file
image: assets/icons/app_logo.png
#for showing the splash in the particular platform. By default it is false
android: true
ios:true
web: false
#for adjusting image (fill acc to screen resoultion)for android and for ios
android_gravity: fill…