I want to Change the Splash Screen time by using flutter_native_splash package.
So how i can change the splash screen time?
@Kamrul is right you should not add intentional delay in your app. But if it is client's requirement as I used to have one in one of my project just change your "main function" located in main.dart as following.
void main() async {
await Future.delayed(Duration(seconds: 3));
runApp(MyApp());
}
Here are the changed I've made in the default main function.
You should not use splash_screen to delay the user intentionally. Instead you should use splash_screen to load all necessary data background and close splash as soon as the app data is loaded from the internet.
If you also read through the package you will see in the FAQ the following:
Can I change the duration of the splash screen?
The native splash screen is displayed while the native app loads the Flutter framework. Because the resources in your app cannot load while the native splash screen is displayed, the native splash screen must be as fast as possible. Note that delaying the user experience is a poor design decision.
So, you should only use splash screen to load contents from the internet to your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With