Originally published on PEAKIQ
Source: https://www.peakiq.in/blog/how-to-implement-a-custom-native-splash-screen-in-flutter
How to Add a Native Splash Screen in Flutter
A splash screen is the first thing users see when they open your app. In Flutter, you can create a native splash screen that appears instantly β before Flutter even loads β using the flutter_native_splash package. This gives your app a polished, professional feel from the very first frame.
In this tutorial you will configure colors, apply the splash to both iOS and Android, and control exactly when the splash disappears using preserve() and remove() .
Step 1 β Install the Package
Add flutter_native_splash to your pubspec.yaml under dev_dependencies :
dev_dependencies : flutter_native_splash : ^2.4.7
Enter fullscreen mode
Exit fullscreen mode
Then fetch it:
flutter pub get
Enter fullscreen mode
Exit fullscreen mode
Step 2 β Create the Configuration File
Create a file named flutter_native_splash.yaml in your project root andβ¦