-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.dart
40 lines (37 loc) · 1.3 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
import 'package:flutter/material.dart';
import 'package:msf/bindings/bindings.dart';
import 'package:get/get.dart';
import 'package:msf/controllers/ThemeController.dart';
import 'package:msf/screens/HomeScreen.dart';
import 'package:msf/screens/LoginScreen.dart';
import 'package:msf/screens/SettingScreen.dart';
import 'package:msf/screens/WebSiteScreen.dart';
import 'package:msf/utills/theme.dart';
import 'package:msf/utills/translator.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
Get.put(ThemeController());
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Obx(() {
bool isDark = Get.find<ThemeController>().isDark.value;
return GetMaterialApp(
debugShowCheckedModeBanner: false,
translations: Translator(),
initialBinding: MyBindings(),
getPages: [
GetPage(name: '/home', page: () => HomeScreen()),
GetPage(name: '/websites', page: () => Websitescreen()),
GetPage(name: '/setting', page: () => Settingscreen()),
GetPage(name: '/l', page: () => LoginScreen()),
],
initialRoute: '/home',
title: 'ModSec Admin Panel'.tr,
theme: getTheme(isDark),
);
});
}
}