From 458819398ddeb19025ffc78daf73dcbfd194fcb7 Mon Sep 17 00:00:00 2001 From: aamir-csol Date: Thu, 16 Apr 2026 20:20:14 +0300 Subject: [PATCH] Localization & rad error fix --- lib/core/location_util.dart | 22 +++++++++++++++++++ .../book_appointment/select_clinic_page.dart | 1 + .../possible_conditions_screen.dart | 1 + 3 files changed, 24 insertions(+) diff --git a/lib/core/location_util.dart b/lib/core/location_util.dart index 52a2e93d..0e360abe 100644 --- a/lib/core/location_util.dart +++ b/lib/core/location_util.dart @@ -362,4 +362,26 @@ class LocationUtils { onFailure?.call(); } } + + + + void onFailureDilouge(){ + return showCommonBottomSheetWithoutHeight( + title: LocaleKeys.notice.tr(context: navigationService.navigatorKey.currentContext!), + navigationService.navigatorKey.currentContext!, + child: Utils.getWarningWidget( + loadingText: LocaleKeys.grantLocationPermission.tr(), + isShowActionButtons: true, + onCancelTap: () { + navigationService.pop(); + }, + onConfirmTap: () async { + navigationService.pop(); + openAppSettings(); + }), + callBackFunc: () {}, + isFullScreen: false, + isCloseButtonVisible: true, + ); + } } diff --git a/lib/presentation/book_appointment/select_clinic_page.dart b/lib/presentation/book_appointment/select_clinic_page.dart index 276c4581..05abdb8a 100644 --- a/lib/presentation/book_appointment/select_clinic_page.dart +++ b/lib/presentation/book_appointment/select_clinic_page.dart @@ -1360,6 +1360,7 @@ class _SelectClinicPageState extends State { }, onFailure: () { regionVM.setSortByLocation(false); + locationUtils.onFailureDilouge(); }, onLocationDeniedForever: () { regionVM.setSortByLocation(false); diff --git a/lib/presentation/symptoms_checker/possible_conditions_screen.dart b/lib/presentation/symptoms_checker/possible_conditions_screen.dart index e89cb209..1902cf72 100644 --- a/lib/presentation/symptoms_checker/possible_conditions_screen.dart +++ b/lib/presentation/symptoms_checker/possible_conditions_screen.dart @@ -373,6 +373,7 @@ class PossibleConditionsPage extends StatelessWidget { }, onFailure: () { regionVM.setSortByLocation(false); + locationUtils.onFailureDilouge(); }, onLocationDeniedForever: () { regionVM.setSortByLocation(false);