Facebook Twitter Instagram
    DeepCrazyWorld
    Facebook Twitter Instagram Pinterest YouTube
    • FLUTTER
      • FLUTTER APP
        • QRCode
        • Quiz App
        • Chat GPT
        • PDF App
        • News App
        • Fitness App
        • Weather App
        • BMI Calculator
        • GAME APP
        • Ecommerce App
        • wallpaper App
        • Finance app
        • Chat App
        • Wallet App
        • Taxi App
        • Quran app
        • Music player app
      • FLUTTER UI
        • Splash Screen
        • Onboarding Screen
        • Login Screen
        • Card Design
        • Drawer
    • PROJECT
      • Android Projects
      • College Projects
      • FLUTTER APP
      • Project Ideas
      • PHP Projects
      • Python Projects
    • SOURCE CODE
    • ANDROID
      • ANDROID APP
      • GAME APP
      • ANDROID STUDIO
    • MCQ
      • AKTU MCQ
        • RPA MCQ
        • COA MCQ
        • HPC MCQ
        • SPM MCQ
        • Renewable Energy All MCQ
        • Data Compression MCQ
        • Data Structure MCQ
        • Digital Image Processing MCQ
        • Software Engineering MCQ
        • Machine Learning MCQ
        • Artificial Intelligence MCQ
      • D PHARMA MCQ
        • Pharmaceutics – I MCQ
        • Pharmacognosy MCQ
        • Pharmaceutical Chemistry MCQ
        • Biochemistry and Clinical Pathology MCQ
        • Human Anatomy and Physiology MCQ
        • Heath Education and Community Pharmacy MCQ
    • INTERVIEW QUESTIONS
      • Flutter Interview Questions
      • INTERVIEW QUESTIONS
      • Python Interview Questions
      • Coding ninjas solution
    • MORE
      • WORDPRESS
        • SEO
        • TOP 10 WORDPRESS THEME
      • PRODUCTIVITY
      • Program
      • QUOTES
    DeepCrazyWorld
    Home»Splash Screen»How to create a simple splash screen in Flutter 2023
    Splash Screen

    How to create a simple splash screen in Flutter 2023

    DeepikaBy DeepikaAugust 8, 2022Updated:November 13, 2023No Comments3 Mins Read

    In this article we are going to discussed about How to create a simple splash screen in Flutter

    Table of Contents

    Toggle
    • What is a splash screen?
    • Related Articles:
    • READ MORE

    What is a splash screen?


    A splash screen is a screen that briefly opens whenever you open an application. A splash screen is also called the launch screen or startup screen and appears as soon as you click on the app icon to launch it. A splash screen usually appears for two to four seconds and then disappears, and the application home screen is launched. Below are some pictures of a splash screen.

    How to create a splash screen in Flutter
    We will use the Timer() function to create a splash screen in Flutter. First, we create a new Flutter application with the following command:

    <img decoding=
    
    flutter create new_flutter_app


    The application will be created and will have a main.dart file, where we add the following code:

    import 'package:flutter/material.dart';
    
    void main() {
      runApp(MyApp());
    }
    
    class MyApp extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          debugShowCheckedModeBanner: false,
          title: 'Flutter Demo',
          theme: ThemeData(
            
            
            visualDensity: VisualDensity.adaptivePlatformDensity,
          ),
          home: HomePage() 
      }
    }

    We will create a stateful widget named SplashScreen and add the code for the splash screen in it. The splash screen can just have a simple logo or the name of the app.

    First, we create a stateless widget in the main.dart file named homepage screen. Then, we add a simple code for the second screen and add some styling to it. After our widget for the second screen is ready, we just need to write code to connect it.

    We will add the timer, which specifies how long the screen is displayed whenever it is launched. We add the timer in initState().

    The following is the code to add a splash screen:

    class SplashScreen extends StatefulWidget {
      @override
      _SplashScreenState createState() => _SplashScreenState();
    }
    class _SplashScreenState extends State<MyHomePage> {
      @override
      void initState() {
        super.initState();
        Timer(Duration(seconds: 3),
              ()=>Navigator.pushReplacement(context,MaterialPageRoute(builder:(context) => HomeScreen()));
      }
      @override
      Widget build(BuildContext context) {
        return Container(
          child: Text("This is the splash screen")
        );
      }
    }

    The code below is added to the new homepage.dart file, which contains the screen displayed after the splash screen.

    class HomeScreen extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          appBar: AppBar(title:Text("This is the secoind screen")),
          body: Text("Home page",textScaleFactor: 2,)
        );
      }
    }

    How to Setup Space Between Elements In Flutter 2023

    Do like & share my Facebook page. if you find this post helpful. Thank you!!

    Related Articles:

    • How to Install Flutter in windows 10 | With videos guide
    • How to Setup Space Between Elements In Flutter 
    • Flutter Card Widget with Example
    • Integrating an API into a Flutter – Working with REST APIs
    • Android Projects with Source Code
    • Flutter Interview Questions
    • School Database Management System Project 

    READ MORE

    If you found this post useful, don’t forget to share this with your friends, and if you have any query feel free to comment it in the comment section.

    Thank you πŸ™‚ Keep Learning !

    Share. Facebook Twitter LinkedIn WhatsApp Telegram Pinterest Reddit Email
    Previous ArticleFlutter Card Widget with Example Tutorial 2023
    Next Article Top 30 Trending Android Projects Ideas for Beginner to Advanced

    Related Posts

    Animated login screen page designed with flutter dart

    Login Screen 2 Mins Read

    A Flutter Animated Login screen UI design source code

    Login Screen 3 Mins Read

    Flutter Login Signup UI Screens with Animation source code

    Login Screen 2 Mins Read

    Beautiful Animated splash screen ui design with flutter

    Splash Screen 2 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • Implementing a Dynamic FAQ Screen UI in Flutter Using ExpansionTile March 29, 2025
    • Creating an Instruction UI Screen in Flutter Application March 29, 2025
    • Animated Backgrounds in Flutter: A Complete Guide March 15, 2025
    • How to make Diary App using flutter stepwise using getx August 31, 2024
    • How to Create Music Player UI screen with fully functional in flutter August 30, 2024
    • How to make ListView Builder Ui in flutter with Source Code August 29, 2024
    • Create a TabBar View in flutter with fully functional stepwise August 28, 2024
    • How to create TabBar view in flutter with source code step wise August 27, 2024
    • How to make Heart rate measure app with Flutter stepwise August 26, 2024
    • How to make ChatGpt App in flutter with source code Stepwise August 25, 2024
    Facebook Twitter Instagram Pinterest YouTube
    • About
    • Contact
    • Disclaimer
    • Privacy Policy
    Copyright by DeepCrazyWorld © 2025

    Type above and press Enter to search. Press Esc to cancel.