Splash Screen

 import "dart:async";

import "package:celloip/current_date_time.dart";
import "package:flutter/material.dart";

class SplashScreenDemo extends StatefulWidget {
SplashScreenDemo({super.key});

@override
State<SplashScreenDemo> createState() => _SplashScreenDemoState();
}

class _SplashScreenDemoState extends State<SplashScreenDemo> {

@override
void initState() {
super.initState();

Timer(Duration(seconds: 1,), () {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) {
return CurrentDateTime();
},
),
);
});
}


@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
color: Colors.blue,
child: Center(child: Text("Current Date & Time", style: TextStyle(
fontSize: 40.0,
fontWeight: FontWeight.bold,
color: Colors.white,
),),),
),
);
}
}

Comments

Popular posts from this blog

Pagination with Bloc Pattern in Flutter

Pagination First Practical in Flutter

ExpansionPanel with ExpansionPanelList with Complete Collapse Operation in Flutter