58 lines
1.6 KiB
Dart
58 lines
1.6 KiB
Dart
import 'dart:async';
|
|
import 'dart:developer';
|
|
|
|
import 'package:connectivity_plus/connectivity_plus.dart';
|
|
import 'package:device_info_plus/device_info_plus.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:permission_handler/permission_handler.dart';
|
|
import 'package:regroup/Utils/dialogs.dart';
|
|
import 'package:regroup/resources/routes/route_name.dart';
|
|
import 'package:regroup/resources/routes/routes.dart';
|
|
import 'package:statsfl/statsfl.dart';
|
|
|
|
Future<void> main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
SystemChrome.setPreferredOrientations([
|
|
DeviceOrientation.portraitUp,
|
|
]).then((value) =>
|
|
// runApp(MyApp())
|
|
runApp(const MyApp())
|
|
|
|
// StatsFl(
|
|
// align: Alignment.center,
|
|
// width: 200,
|
|
// height: 100,
|
|
// child: const MyApp())),
|
|
);
|
|
}
|
|
|
|
class MyApp extends StatefulWidget {
|
|
const MyApp({super.key});
|
|
|
|
@override
|
|
State<MyApp> createState() => _MyAppState();
|
|
}
|
|
|
|
class _MyAppState extends State<MyApp> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ScreenUtilInit(
|
|
builder: (BuildContext context, Widget? child) => GetMaterialApp(
|
|
title: 'Regroup',
|
|
theme: ThemeData(
|
|
primarySwatch: Colors.grey,
|
|
fontFamily: 'Cambria',
|
|
),
|
|
debugShowCheckedModeBanner: false,
|
|
initialRoute: RouteName.splashScreen,
|
|
getPages: AppRoutes.appRoutes(),
|
|
),
|
|
designSize: const Size(390, 844),
|
|
);
|
|
}
|
|
}
|