From 3b881f1ab3ef1032a042df5343dce50667be160a Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 16 Aug 2020 11:38:00 +0300 Subject: [PATCH] appointment details scenarios handled --- lib/pages/MyAppointments/widgets/AppointmentActions.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/pages/MyAppointments/widgets/AppointmentActions.dart b/lib/pages/MyAppointments/widgets/AppointmentActions.dart index 4852909b..1176140b 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentActions.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentActions.dart @@ -380,8 +380,12 @@ class _AppointmentActionsState extends State { prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report)); }); print(prescriptionReportEnhList.length); - navigateToMedicinePrescriptionReport( - prescriptionReportEnhList, res['ListPRM']); + if (prescriptionReportEnhList.length != 0) { + navigateToMedicinePrescriptionReport( + prescriptionReportEnhList, res['ListPRM']); + } else { + AppToast.showErrorToast(message: "Sorry there is no data"); + } }).catchError((err) { print(err); AppToast.showErrorToast(message: err);