feat : add screen utils for app

This commit is contained in:
2025-06-29 11:56:22 +03:30
parent 61b74a6648
commit ffa66157dd
2 changed files with 23 additions and 16 deletions

View File

@@ -3,6 +3,7 @@ import 'package:rasadyar_app/presentation/routes/app_pages.dart';
import 'package:rasadyar_auth/auth.dart'; import 'package:rasadyar_auth/auth.dart';
import 'package:rasadyar_auth/data/services/token_storage_service.dart'; import 'package:rasadyar_auth/data/services/token_storage_service.dart';
import 'package:rasadyar_core/core.dart'; import 'package:rasadyar_core/core.dart';
import 'infrastructure/di/di.dart'; import 'infrastructure/di/di.dart';
import 'infrastructure/service/auth_service.dart'; import 'infrastructure/service/auth_service.dart';
@@ -44,23 +45,28 @@ class MyApp extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GetMaterialApp( return ScreenUtilInit(
title: 'رصدیار', designSize: const Size(412, 917),
theme: ThemeData( minTextAdapt: true,
fontFamily: 'yekan', splitScreenMode: true,
colorScheme: ColorScheme.fromSeed(seedColor: AppColor.blueNormal), 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,
],
); );
} }
} }

View File

@@ -11,6 +11,7 @@ export 'package:font_awesome_flutter/font_awesome_flutter.dart';
export 'package:device_info_plus/device_info_plus.dart'; export 'package:device_info_plus/device_info_plus.dart';
export 'package:dio/dio.dart' ; export 'package:dio/dio.dart' ;
export 'package:pretty_dio_logger/pretty_dio_logger.dart'; export 'package:pretty_dio_logger/pretty_dio_logger.dart';
export 'package:flutter_screenutil/flutter_screenutil.dart';
//freezed //freezed
export 'package:freezed_annotation/freezed_annotation.dart'; export 'package:freezed_annotation/freezed_annotation.dart';
export 'package:geolocator/geolocator.dart'; export 'package:geolocator/geolocator.dart';