import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:web_panel/routs/rout.dart';
import 'package:web_panel/screens/device%20management/device.dart';
import 'package:web_panel/screens/global_variable.dart';
import 'package:web_panel/screens/login/login_screen.dart';
import 'package:web_panel/utils/App_color.dart';
import 'main.dart';
import 'screens/main/main_screen.dart';

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {

    return ScreenUtilInit(
      builder: (_ , child) {
        return GetMaterialApp(
          navigatorKey: navigatorKey,
          debugShowCheckedModeBanner: false,
          title: 'Web Panel',

          theme: ThemeData.dark().copyWith(
            scaffoldBackgroundColor: AppColor.bgColor,
            textTheme: GoogleFonts.poppinsTextTheme(Theme.of(context).textTheme)
                .apply(bodyColor: Colors.white),
            canvasColor: AppColor.secondaryColor,
          ),
          initialRoute: '/',
          getPages: Rout.getPages,
        );
      }
    );
  }
}
