BusinessAppFlutter/openclosenew/lib/main.dart

68 lines
1.5 KiB
Dart
Raw Normal View History

import 'package:flutter/material.dart';
import 'package:openclosenew/iintroduction_screen.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
color: Colors.white,
debugShowCheckedModeBanner: false,
theme: ThemeData(fontFamily: 'Manrope'),
home: const Splash(),
);
}
}
class Splash extends StatefulWidget {
const Splash({Key? key}) : super(key: key);
@override
State<Splash> createState() => _SplashState();
}
class _SplashState extends State<Splash> {
@override
void initState() {
// TODO: implement initState
super.initState();
Future.delayed(const Duration(seconds: 3), () {
Navigator.pushReplacement(
context, MaterialPageRoute(builder: (contaxt) => HomeScreen()));
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'assets/images/img.png',
height: 130,
),
const SizedBox(
height: 30,
),
],
),
),
);
}
}
class HomeScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return IntroScreen();
}
}