mirrored_repositories/Daily-Report
import 'package:altogic/altogic.dart';
import 'package:daily_report/components/constant/contant.dart';
import 'package:daily_report/view/admin_view/dashboard_screen.dart';
import 'package:daily_report/view/common_view/splash_screen.dart';
import 'package:daily_report/view/employee_view/user_not_found.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:google_fonts/google_fonts.dart';

void main() async {
  runApp(MyApp());
  WidgetsFlutterBinding.ensureInitialized();
  await altogic.restoreAuthSession();
}

AltogicClient altogic = createClient(
    'https://c4-na.altogic.com/e:63a5c066686ef5ad6850530b',
    'a8e7b0e4854b4524b19c221e5aa23f70');

class MyApp extends StatefulWidget {
  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends AltogicState<MyApp> {
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        inputDecorationTheme: InputDecorationTheme(
          focusedBorder:
              UnderlineInputBorder(borderSide: BorderSide(color: Colors.grey)),
          enabledBorder: UnderlineInputBorder(
            borderSide: BorderSide(color: appMainColor),
          ),
        ),
        colorScheme: ColorScheme.fromSwatch().copyWith(
          primary: appMainColor,
        ),
        textTheme: GoogleFonts.montserratTextTheme(Theme.of(context).textTheme),
        primaryTextTheme:
            GoogleFonts.montserratTextTheme(Theme.of(context).textTheme),
        outlinedButtonTheme: OutlinedButtonThemeData(
          style: ButtonStyle(
            padding: MaterialStateProperty.all<EdgeInsets>(
              const EdgeInsets.all(24),
            ),
            backgroundColor: MaterialStateProperty.all<Color>(Colors.blue),
            foregroundColor: MaterialStateProperty.all<Color>(Colors.white),
          ),
        ),
      ),
      home: SplashScreen(),
    );
  }
}
