diff --git a/lib/screens/pharmacy_intervention/viewmodel/pharmacy_intervention_service.dart b/lib/screens/pharmacy_intervention/viewmodel/pharmacy_intervention_service.dart index 79a5bb3a..8410d806 100644 --- a/lib/screens/pharmacy_intervention/viewmodel/pharmacy_intervention_service.dart +++ b/lib/screens/pharmacy_intervention/viewmodel/pharmacy_intervention_service.dart @@ -78,7 +78,6 @@ class PharmacyInterventionService extends BaseService { }, onFailure: (String error, int statusCode) { hasError = true; DrAppToastMsg.showErrorToast(error); - super.error = super.error ?? "" + "\n" + error; }, body: {}); return success; @@ -97,8 +96,6 @@ class PharmacyInterventionService extends BaseService { }, onFailure: (String error, int statusCode) { hasError = true; DrAppToastMsg.showErrorToast(error); - - super.error = super.error! + "\n" + error; }, body: {}); return success; } @@ -125,9 +122,6 @@ class PharmacyInterventionService extends BaseService { }, onFailure: (String error, int statusCode) { hasError = true; DrAppToastMsg.showErrorToast(error); - - super.error = super.error! + "\n" + error; - }, body: request); return result; } @@ -139,11 +133,10 @@ class PharmacyInterventionService extends BaseService { var result = false; await baseAppClient.post(UPDATE_INFECTIOUS_STATUS, onSuccess: (dynamic response, int statusCode) { - result = response['IsAccepted']; + result = response['IsAccepted'] ?? false; }, onFailure: (String error, int statusCode) { hasError = true; DrAppToastMsg.showErrorToast(error); - super.error = super.error! + "\n" + error; }, body: request); return result; } @@ -158,8 +151,6 @@ class PharmacyInterventionService extends BaseService { }, onFailure: (String error, int statusCode) { hasError = true; DrAppToastMsg.showErrorToast(error); - - super.error = super.error! + "\n" + error; }, body: {}); return station; }