-
Notifications
You must be signed in to change notification settings - Fork 24
/
main.dart
41 lines (35 loc) · 1.29 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
import 'package:flutter/material.dart';
import 'package:letschat/components/colors.dart';
import 'package:letschat/screens/welcome_screen.dart';
import 'package:letschat/screens/login_screen.dart';
import 'package:letschat/screens/registration_screen.dart';
import 'package:letschat/screens/chat_screen.dart';
import 'package:flutter/services.dart';
import 'package:firebase_core/firebase_core.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp,DeviceOrientation.portraitDown]).then((_)=> runApp(FlashChat()));
}
class FlashChat extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(
accentColor: PalletteColors.lightSkin,
primaryColor: PalletteColors.primaryRed,
textTheme: TextTheme(
bodyText2: TextStyle(color: Colors.black54),
),
),
initialRoute: WelcomeScreen.id,
routes: {
WelcomeScreen.id:(context)=> WelcomeScreen(),
ChatScreen.id:(context) => ChatScreen(),
LoginScreen.id:(context) => LoginScreen(),
RegistrationScreen.id:(context) => RegistrationScreen(),
},
);
}
}