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

Second GET API Calling with Bloc simple Example in Flutter

Stack Container Scrollable Card widget UI with Custom Widget

Pagination with Bloc Pattern in Flutter