-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.dart
56 lines (53 loc) · 1.78 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
56
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:flutter_downloader/flutter_downloader.dart';
import './screens/attendence.dart';
import './screens/schedule.dart';
import './providers/students.dart';
import './screens/additional_learning.dart';
import './screens/assignments.dart';
import './screens/profile.dart';
import './providers/subject.dart';
import './screens/subjects_screen.dart';
import './screens/dashboard.dart';
import './screens/edit_profile.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await FlutterDownloader.initialize(debug: debug);
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
final platform = Theme.of(context).platform;
return MultiProvider(
providers: [
ChangeNotifierProvider.value(
value: Subjects(),
),
ChangeNotifierProvider.value(
value: Students(),
),
],
child: MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Demo',
theme: ThemeData.light(),
routes: {
'/': (ctx) => Dashboard(),
SubjectScreen.routeName: (ctx) => SubjectScreen(),
Profile.routeName: (ctx) => Profile(),
Assignments.routeName: (ctx) => Assignments(
title: 'Assignments',
platform: platform,
),
AdditionalLearning.routeName: (ctx) => AdditionalLearning(),
Attendences.routeName: (ctx) => Attendences(),
Schedule.routeName: (ctx) => Schedule(),
EditProfile.routeName: (ctx) => EditProfile(),
},
),
);
}
}