content: import 'package:flutter/material.dart';
  import 'package:flutter_easyloading/flutter_easyloading.dart';
  import 'package:get/get.dart';
  import 'package:hive_flutter/hive_flutter.dart';
  import 'package:my_grocery/model/ad_banner.dart';
  import 'package:my_grocery/model/category.dart';
  import 'package:my_grocery/model/product.dart';
  import 'package:my_grocery/model/user.dart';
  import 'package:my_grocery/route/app_page.dart';
  import 'package:my_grocery/route/app_route.dart';
  import 'package:my_grocery/theme/app_theme.dart';
  
  void main() async {
    WidgetsFlutterBinding.ensureInitialized();
    await Hive.initFlutter();
  
    //register adapters
    Hive.registerAdapter(AdBannerAdapter());
    Hive.registerAdapter(CategoryAdapter());
    Hive.registerAdapter(ProductAdapter());
    Hive.registerAdapter(UserAdapter());
  
    configLoading();
    runApp(const MyApp());
  }
  
  class MyApp extends StatelessWidget {
    const MyApp({Key? key}) : super(key: key);
  
    @override
    Widget build(BuildContext context) {
      return GetMaterialApp(
        getPages: AppPage.list,
        initialRoute: AppRoute.dashboard,
        debugShowCheckedModeBanner: false,
        theme: AppTheme.lightTheme,
        themeMode: ThemeMode.light,
        builder: EasyLoading.init(),
      );
    }
  }
  
  void configLoading(){
    EasyLoading.instance
      ..displayDuration = const Duration(milliseconds: 2000)
      ..indicatorType = EasyLoadingIndicatorType.fadingCircle
      ..loadingStyle = EasyLoadingStyle.dark
      ..indicatorSize = 45.0
      ..radius = 10.0
      ..progressColor = Colors.white
      ..backgroundColor = Colors.green
      ..indicatorColor = Colors.white
      ..textColor = Colors.white
      ..userInteractions = false
      ..maskType = EasyLoadingMaskType.black
      ..dismissOnTap = true;
  }
  