forked from mastermrx/Hacktoberfest-2021-01
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.dart
51 lines (46 loc) · 1.17 KB
/
index.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import 'package:flutter/material.dart';
import 'package:flutterml/screens/menupage.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Splash());
}
}
class Splash extends StatefulWidget {
@override
_SplashState createState() => _SplashState();
}
class _SplashState extends State<Splash> {
@override
// ignore: must_call_super
void initState() {
Future.delayed(Duration(seconds: 6), () {
Navigator.push(
context, MaterialPageRoute(builder: (context) => MenuPage()));
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
color: Colors.white,
height: double.infinity,
width: double.infinity,
child: Center(
child: Text(
"Flutter ML",
style: TextStyle(fontSize: 50, color: Colors.blueAccent),
)),
),
);
}
}