UX Friendly SplashScreen in Flutter
If you’re targeting Android 12+ you can configure just a standard native splash screen and then use deferFirstFrame to instruct Flutter to start drawing.
void main() async {
final binding = WidgetsFlutterBinding.ensureInitialized();
binding.deferFirstFrame();
runApp(MyApp());
}
Somewhere in your code you can have a function similar to
// somewhere after your async initialization
void init(WidgetsFlutterBinding binding) async {
await initializeAsyncDependencies();
binding.allowFirstFrame();
}
This allows us to do avoid switching some screens during the initializaton (e.g. authentication state) and instead present ready loaded data to the user at once.
There's no articles to list here yet.