diff --git a/lib/main.dart b/lib/main.dart index 395decd..543d9ad 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -3,6 +3,7 @@ import 'package:rasadyar_app/presentation/routes/app_pages.dart'; import 'package:rasadyar_auth/auth.dart'; import 'package:rasadyar_auth/data/services/token_storage_service.dart'; import 'package:rasadyar_core/core.dart'; + import 'infrastructure/di/di.dart'; import 'infrastructure/service/auth_service.dart'; @@ -44,23 +45,28 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - return GetMaterialApp( - title: 'رصدیار', - theme: ThemeData( - fontFamily: 'yekan', - colorScheme: ColorScheme.fromSeed(seedColor: AppColor.blueNormal), + return ScreenUtilInit( + designSize: const Size(412, 917), + minTextAdapt: true, + splitScreenMode: true, + child: GetMaterialApp( + title: 'رصدیار', + theme: ThemeData( + fontFamily: 'yekan', + colorScheme: ColorScheme.fromSeed(seedColor: AppColor.blueNormal), + ), + initialRoute: AppPages.initRoutes, + getPages: AppPages.pages, + locale: const Locale("fa", "IR"), + supportedLocales: const [Locale("fa", "IR")], + localizationsDelegates: [ + PersianMaterialLocalizations.delegate, + PersianCupertinoLocalizations.delegate, + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + ], ), - initialRoute: AppPages.initRoutes, - getPages: AppPages.pages, - locale: const Locale("fa", "IR"), - supportedLocales: const [Locale("fa", "IR")], - localizationsDelegates: [ - PersianMaterialLocalizations.delegate, - PersianCupertinoLocalizations.delegate, - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - ], ); } } diff --git a/packages/core/lib/core.dart b/packages/core/lib/core.dart index 6f6f95b..bf572c9 100644 --- a/packages/core/lib/core.dart +++ b/packages/core/lib/core.dart @@ -11,6 +11,7 @@ export 'package:font_awesome_flutter/font_awesome_flutter.dart'; export 'package:device_info_plus/device_info_plus.dart'; export 'package:dio/dio.dart' ; export 'package:pretty_dio_logger/pretty_dio_logger.dart'; +export 'package:flutter_screenutil/flutter_screenutil.dart'; //freezed export 'package:freezed_annotation/freezed_annotation.dart'; export 'package:geolocator/geolocator.dart';