From e3b12b20372b20ca491ed550eabfd0748af7fb93 Mon Sep 17 00:00:00 2001 From: mortza mansory <79837660+mortzaCFT@users.noreply.github.com> Date: Sun, 20 Oct 2024 21:36:14 +0330 Subject: [PATCH] Add files via upload --- main.dart | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 main.dart diff --git a/main.dart b/main.dart new file mode 100644 index 0000000..7a547c5 --- /dev/null +++ b/main.dart @@ -0,0 +1,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().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), + ); + }); + } +}