|
|
- import 'package:flutter/material.dart';
- import 'package:get/get_navigation/src/root/get_material_app.dart';
- import 'package:get_storage/get_storage.dart';
- import 'package:sqflite_pust_local_notification/db/db_helper.dart';
- import 'package:sqflite_pust_local_notification/services/theme_service.dart';
- import 'package:sqflite_pust_local_notification/ui/my_home_screen.dart';
- import 'package:sqflite_pust_local_notification/utils/theme.dart';
-
- Future<void> main() async {
- WidgetsFlutterBinding.ensureInitialized();
- await DBHelper.initDb();
- await GetStorage.init();
- runApp(const MyApp());
- }
-
- class MyApp extends StatelessWidget {
- const MyApp({Key? key}) : super(key: key);
-
- // This widget is the root of your application.
- @override
- Widget build(BuildContext context) {
- return GetMaterialApp(
- title: 'Flutter Demo',
- theme: Themes.light,
- darkTheme: Themes.dark,
- themeMode: ThemeService().theme,
- home: const MyHomeScreen());
- }
- }
|