From 21403a2bbafe07a830a71eebc81719e9b5e3aa58 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 17 Dec 2024 11:13:39 +0300 Subject: [PATCH] InPatient Help PRO error handling issue resolved --- lib/pages/InPatientServices/help_PRO.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/pages/InPatientServices/help_PRO.dart b/lib/pages/InPatientServices/help_PRO.dart index f5e8f6b4..61bd03c8 100644 --- a/lib/pages/InPatientServices/help_PRO.dart +++ b/lib/pages/InPatientServices/help_PRO.dart @@ -159,8 +159,13 @@ class _HelpPROState extends State { (projectViewModel.user.firstNameN! + " " + projectViewModel.user.lastNameN!), projectViewModel.user.mobileNumber!, assistText.text, context) .then((res) { GifLoaderDialogUtils.hideDialog(context); - AppToast.showSuccessToast(message: TranslationBase.of(context).successSendReport); - Navigator.of(context).pop(); + if (res['MessageStatus'] == 1) { + AppToast.showSuccessToast(message: TranslationBase.of(context).successSendReport); + Navigator.of(context).pop(); + } else { + AppToast.showErrorToast(message: res['ErrorEndUserMessage'], localContext: context); + Navigator.of(context).pop(); + } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); print(err);