diff --git a/assets/images/svg/ar_lang_icon.svg b/assets/images/svg/ar_lang_icon.svg new file mode 100644 index 0000000..d1c2be0 --- /dev/null +++ b/assets/images/svg/ar_lang_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/svg/en_lang_icon.svg b/assets/images/svg/en_lang_icon.svg new file mode 100644 index 0000000..fa1c143 --- /dev/null +++ b/assets/images/svg/en_lang_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/lib/core/app_assets.dart b/lib/core/app_assets.dart index 26da9fa..f6fd88a 100644 --- a/lib/core/app_assets.dart +++ b/lib/core/app_assets.dart @@ -305,6 +305,9 @@ class AppAssets { static const String bloodPressure = '$svgBasePath/blood_pressure.svg'; static const String temperature = '$svgBasePath/temperature.svg'; + static const String arLangIcon = '$svgBasePath/ar_lang_icon.svg'; + static const String enLangIcon = '$svgBasePath/en_lang_icon.svg'; + // PNGS // static const String hmgLogo = '$pngBasePath/hmg_logo.png'; static const String liveCareService = '$pngBasePath/livecare_service.png'; diff --git a/lib/features/authentication/authentication_view_model.dart b/lib/features/authentication/authentication_view_model.dart index 6379456..0c4ba09 100644 --- a/lib/features/authentication/authentication_view_model.dart +++ b/lib/features/authentication/authentication_view_model.dart @@ -571,7 +571,7 @@ class AuthenticationViewModel extends ChangeNotifier { MedicalFileViewModel medicalVm = getIt(); if (!_appState.getIsChildLoggedIn) { await medicalVm.getFamilyFiles(status: 0); - await medicalVm.getAllPendingRecordsByResponseId(); + // await medicalVm.getAllPendingRecordsByResponseId(); _navigationService.replaceAllRoutesAndNavigateToLanding(); } } else { @@ -610,7 +610,7 @@ class AuthenticationViewModel extends ChangeNotifier { MedicalFileViewModel medicalVm = getIt(); insertPatientIMEIData(loginTypeEnum.toInt); medicalVm.getFamilyFiles(status: 0); //TODO: Remove status: 1 by Aamir Need to Discuss With Sultan - medicalVm.getAllPendingRecordsByResponseId(); + // medicalVm.getAllPendingRecordsByResponseId(); } await clearDefaultInputValues(); if (isUserAgreedBefore) { diff --git a/lib/presentation/appointments/my_appointments_page.dart b/lib/presentation/appointments/my_appointments_page.dart index 1209467..c9e7048 100644 --- a/lib/presentation/appointments/my_appointments_page.dart +++ b/lib/presentation/appointments/my_appointments_page.dart @@ -155,7 +155,7 @@ class _MyAppointmentsPageState extends State { isLoading: true, isFromHomePage: false, ), - ).paddingSymmetrical(24.h, 0.h) + ) : filteredAppointmentList.isNotEmpty ? AnimationConfiguration.staggeredList( position: index, diff --git a/lib/presentation/book_appointment/select_doctor_page.dart b/lib/presentation/book_appointment/select_doctor_page.dart index e57ed51..3723bee 100644 --- a/lib/presentation/book_appointment/select_doctor_page.dart +++ b/lib/presentation/book_appointment/select_doctor_page.dart @@ -178,7 +178,7 @@ class _SelectDoctorPageState extends State { children: [ LocaleKeys.nearestAppo.tr(context: context).toText13(isBold: true), SizedBox(height: 4.h), - LocaleKeys.viewNearestAppos.toText11(color: AppColors.textColorLight, weight: FontWeight.w500), + LocaleKeys.viewNearestAppos.tr(context: context).toText11(color: AppColors.textColorLight, weight: FontWeight.w500), ], ), const Spacer(), diff --git a/lib/presentation/home/landing_page.dart b/lib/presentation/home/landing_page.dart index f8cd159..8267990 100644 --- a/lib/presentation/home/landing_page.dart +++ b/lib/presentation/home/landing_page.dart @@ -198,10 +198,11 @@ class _LandingPageState extends State { mainAxisSize: MainAxisSize.min, spacing: 12.h, children: [ - Stack(children: [ - Utils.buildSvgWithAssets(icon: AppAssets.bell, height: 18.h, width: 18.h).onPress(() async { - if (appState.isAuthenticated) { - notificationsViewModel.setNotificationStatusID(2); + appState.isAuthenticated + ? Stack(children: [ + Utils.buildSvgWithAssets(icon: AppAssets.bell, height: 18.h, width: 18.h).onPress(() async { + if (appState.isAuthenticated) { + notificationsViewModel.setNotificationStatusID(2); notificationsViewModel.getAllNotifications(); Navigator.of(context).push( CustomPageRoute( @@ -236,7 +237,8 @@ class _LandingPageState extends State { ), ) : SizedBox.shrink(), - ]), + ]) + : SizedBox.shrink(), Utils.buildSvgWithAssets(icon: AppAssets.indoor_nav_icon, height: 18.h, width: 18.h).onPress(() { openIndoorNavigationBottomSheet(context); }), @@ -249,6 +251,11 @@ class _LandingPageState extends State { isFullScreen: false, ); }), + !appState.isAuthenticated + ? Utils.buildSvgWithAssets(icon: appState.isArabic() ? AppAssets.enLangIcon : AppAssets.arLangIcon, height: 18.h, width: 18.h).onPress(() { + context.setLocale(appState.isArabic() ? Locale('en', 'US') : Locale('ar', 'SA')); + }) + : SizedBox.shrink() ], ); }),