-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.dart
55 lines (52 loc) · 1.72 KB
/
main.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
52
53
54
55
import 'package:animationApp/screen/chatroom.dart';
import 'package:animationApp/screen/login.dart';
import 'package:animationApp/screen/Register.dart';
import 'package:animationApp/screen/search.dart';
import 'package:flutter/material.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:splashscreen/splashscreen.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
initialRoute: "screen",
routes: {
"reg": (context) => RegisterScreen(),
"login": (context) => LoginScreen(),
"screen": (context) => MyApp(),
"chat": (context) => ChatRoom(),
// "current": (context) => Current(),
},
),
);
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => new _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return new SplashScreen(
seconds: 8,
navigateAfterSeconds: new LoginScreen(),
title: new Text(
'Welcome!',
style: new TextStyle(
fontWeight: FontWeight.bold,
fontSize: 30.0,
color: Colors.black,
decorationColor: Colors.black),
),
image: new Image.asset('images/chat1.jpg'),
//backgroundGradient: new LinearGradient(colors: [Colors.cyan, Colors.blue], begin: Alignment.topLeft, end: Alignment.bottomRight),
backgroundColor: Colors.white,
styleTextUnderTheLoader: new TextStyle(),
photoSize: 150.0,
//onClick: () => print("Your storage"),
loaderColor: Colors.green,
);
}
}