flutter:
assets:
- assets/images/
Complete Code For Splash Screen In Flutter
import 'dart:async'; import 'package:flutter/material.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Splash Screen', theme: ThemeData( primarySwatch: Colors.green, ), home: MyHomePage(), debugShowCheckedModeBanner: false, ); } } class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { @override void initState() { super.initState(); Timer(Duration(seconds: 3), ()=>Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => SecondScreen() ) ) ); } @override Widget build(BuildContext context) { return Container( color: Colors.white, child:Image.asset("assets/images/bs_logo.png") ); } } class SecondScreen extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( centerTitle: true, title:Text("BajarangiSoft.com") ), body: Center( child:Text("Home page",textScaleFactor: 3,) ), ); } }