Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 22.214.171.124 release ready!
Updated 4 May 2023
The splash screen in Flutter is the first screen that is seen by a user when the application is launched.
Actually, this is the time when the application is organizing the resources which are needed to run the application.
Developers can customize the splash screen in various ways according to their requirements.
In this article, we will learn how we can display the splash screen.
You may also check our Flutter app development page.
Here is a piece of code that uses the timer() function to show the splash image til a given time interval.
So let’s discuss what’s happening here.
If you are aware of the basic Flutter code then main() function is the starting point of the application.
runApp(SplashScreenApp()) initializes the Stateless Widget SplashScreenApp.
You then return the title, theme, and home properties to MaterialApp.
MyHomePage() returns a Container that has a child as FlutterLogo(which will be shown initially when the app starts).
initState() first call super.initState() and then Timer of duration 13 seconds.
After 13 seconds, the current screen will be replaced by a new Screen i.e. OtherScreen().
Add the dependency splashscreen to your pubspec.yaml file
Now import the package to your file as below.
In the above code, we are using the splashscreen package to display the splash image from the network.
After completing 13 seconds, it will navigate to a new screen.
Here is the expected result.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.