Member-only story
Launch your app with Flutter Native Splash Screen
Splash screen is a required screen in a mobile application. In most applications it will contain a color and an image or app icon to indicate the app is launching.
We can create a splash screen in Flutter and call it as the home widget in our root MaterialApp widget. But our app will still display a white screen before our splash screen appeared. This is where flutter_native_splash
comes in handy.
This plugin can customize this native splash screen background color and splash image. It supports dark mode, full screen, and platform-specific options as well. So I tried this and thought to share my experience with you.
For a simple usage, there is not much to do.
Install the package and import like this.
flutter_native_splash: latest_version
import 'package:flutter_native_splash/flutter_native_splash.dart';
In addition to this you have to add some code lines to our pubspec.yaml
and run this in the terminal : flutter pub run flutter_native_splash:create
.
Note: Every time you do a change to this, run pub get and splash create command.
flutter_native_splash:
color: "#f5bc42"
image: "assets/apple.png"
android_12:
color: "#42a5f5"