my appointment fix

merge-update-with-lab-changes
haroon amjad 5 years ago
parent b9269f525a
commit bf999e611b

@ -117,19 +117,22 @@ class _MyAppointmentsState extends State<MyAppointments>
service.getPatientAppointmentHistory(false, context).then((res) { service.getPatientAppointmentHistory(false, context).then((res) {
print(res['AppoimentAllHistoryResultList'].length); print(res['AppoimentAllHistoryResultList'].length);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { setState(() {
// setState(() { if (res['MessageStatus'] == 1) {
if (res['AppoimentAllHistoryResultList'].length != 0) { // setState(() {
// isDataLoaded = true; if (res['AppoimentAllHistoryResultList'].length != 0) {
res['AppoimentAllHistoryResultList'].forEach((v) { // isDataLoaded = true;
widget.appoList.add(new AppoitmentAllHistoryResultList.fromJson(v)); res['AppoimentAllHistoryResultList'].forEach((v) {
}); widget.appoList.add(new AppoitmentAllHistoryResultList.fromJson(v));
sortAppointmentList(); });
} else {} sortAppointmentList();
// }); } else {}
} else { // });
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } else {
} AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
isDataLoaded = true;
});
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
@ -256,9 +259,6 @@ class _MyAppointmentsState extends State<MyAppointments>
return; return;
} }
} }
setState(() {
isDataLoaded = true;
});
} }
Widget getBookedAppointments() { Widget getBookedAppointments() {

Loading…
Cancel
Save