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

Loading…
Cancel
Save