pull/318/head
haroon amjad 1 month ago
parent 91876f2b6b
commit 227dd407f5

@ -617,7 +617,12 @@ class MyAppointmentsViewModel extends ChangeNotifier {
patientType: patientType); patientType: patientType);
result.fold( result.fold(
(failure) async => await errorHandlerService.handleError(failure: failure), // (failure) async => await errorHandlerService.handleError(failure: failure),
(failure) async {
if (onError != null) {
onError(failure.message);
}
},
(apiResponse) { (apiResponse) {
if (apiResponse.messageStatus == 2) { if (apiResponse.messageStatus == 2) {
// dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});

@ -862,6 +862,16 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
}); });
} }
}); });
},
onError: (err) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err.toString()),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
}); });
}, onError: (err) { }, onError: (err) {
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(

@ -249,7 +249,8 @@ class _FamilyCardsState extends State<FamilyCards> {
galleryPermission = Permission.photos; galleryPermission = Permission.photos;
} else { } else {
// Android: use photos permission which handles API level differences automatically // Android: use photos permission which handles API level differences automatically
galleryPermission = Permission.photos; print('✅ Android Photo Picker will handle permissions internally');
return true;
} }
// First check current status // First check current status

Loading…
Cancel
Save