BASE: Create AppRouter Util.
This commit is contained in:
@@ -2,11 +2,13 @@ import 'package:customer/screen_ui/splash_screen/splash_screen.dart';
|
||||
import 'package:customer/service/localization_service.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/easy_loading_config.dart';
|
||||
import 'package:customer/utils/app_router.dart';
|
||||
import 'package:customer/utils/preferences.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_phoenix/flutter_phoenix.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'controllers/global_setting_controller.dart';
|
||||
@@ -28,14 +30,14 @@ void main() async {
|
||||
|
||||
runApp(
|
||||
EasyLocalization(
|
||||
startLocale: Locale('en', 'US'),
|
||||
startLocale: Locale('uz', 'UZ'),
|
||||
supportedLocales: [
|
||||
Locale('en', 'US'),
|
||||
Locale('uz', 'UZ'),
|
||||
Locale('ru', 'RU'),
|
||||
],
|
||||
path: 'assets/translations',
|
||||
fallbackLocale: Locale('en', 'US'),
|
||||
fallbackLocale: Locale('uz', 'UZ'),
|
||||
child: MyApp(),
|
||||
),
|
||||
);
|
||||
@@ -54,7 +56,8 @@ class MyApp extends StatelessWidget {
|
||||
designSize: Size(375, 812),
|
||||
minTextAdapt: true,
|
||||
splitScreenMode: true,
|
||||
child: GetMaterialApp(
|
||||
child: MaterialApp(
|
||||
navigatorKey: AppRouter.navigatorKey,
|
||||
localizationsDelegates: context.localizationDelegates,
|
||||
supportedLocales: context.supportedLocales,
|
||||
locale: context.locale,
|
||||
@@ -66,8 +69,7 @@ class MyApp extends StatelessWidget {
|
||||
child: EasyLoading.init()(context, child),
|
||||
);
|
||||
},
|
||||
translations: LocalizationService(),
|
||||
fallbackLocale: LocalizationService.locale,
|
||||
// fallbackLocale: LocalizationService.locale,
|
||||
themeMode: themeController.themeMode,
|
||||
theme: ThemeData(
|
||||
scaffoldBackgroundColor: AppThemeData.surface,
|
||||
|
||||
Reference in New Issue
Block a user