MINOR-FIX: Solve Localization Problem.

This commit is contained in:
2025-12-04 17:18:43 +05:00
parent bf1d07a048
commit 50270ed2da
4 changed files with 49 additions and 47 deletions

View File

@@ -13,6 +13,7 @@ import 'package:get/get.dart';
import 'controllers/global_setting_controller.dart';
import 'controllers/theme_controller.dart';
import 'firebase_options.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
@@ -45,10 +46,16 @@ class MyApp extends StatelessWidget {
splitScreenMode: true,
child: GetMaterialApp(
translations: LocalizationService(),
locale: const Locale('uz', 'UZ'),
navigatorKey: AppRouter.navigatorKey,
fallbackLocale: const Locale('uz', 'UZ'),
locale: const Locale('uz', 'UZ'), // current locale
fallbackLocale: const Locale('en', 'US'),
supportedLocales: LocalizationService.supportedLocales,
localizationsDelegates: const [
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
navigatorKey: AppRouter.navigatorKey,
debugShowCheckedModeBanner: false,
builder: (context, child) {
return SafeArea(