I want the first frame of my app to be an image, the same image as my native splashscreen (on ios). i would like a smooth transition between the native splash screen and the app splash screen.
i am using this widget in my build:
Image.asset(
'assets/splashScreen.jpg',
fit: BoxFit.cover,
width: double.infinity,
height: double.infinity,
),
but this creates a frame without image (white), since the image has to load. so i get a flash between the 2 renders.
i want the image to be loaded before the first build so the transition gets smooth, in the initState. i don't care if it freezes the app. i just don't want this flash between the ios native splash screen and the flutter splash screen.
how could it be done?
precacheImage
top level function