56 lines
1.6 KiB
Dart
56 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:shared_preferences/shared_preferences.dart';
|
|
|
|
// void main() {
|
|
// runApp(const MyApp());
|
|
// }
|
|
|
|
Future<void> main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
|
|
|
SystemChrome.setPreferredOrientations([
|
|
DeviceOrientation.portraitUp,
|
|
]).then((value) => runApp(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:
|
|
// createPrimarySwatch(Color(0xFF737373)),
|
|
Colors.grey,
|
|
fontFamily: 'Cambria',
|
|
),
|
|
debugShowCheckedModeBanner: false,
|
|
initialRoute: RouteName.mainscreen,
|
|
getPages: AppRoutes.appRoutes(),
|
|
),
|
|
designSize: const Size(390, 848),
|
|
);
|
|
}
|
|
}
|