diff --git a/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInHome.dart b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInHome.dart index 64df1b23..94bff23c 100644 --- a/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInHome.dart +++ b/lib/pages/ErService/EROnlineCheckIn/EROnlineCheckInHome.dart @@ -344,10 +344,14 @@ class _EROnlineCheckInHomePageState extends State with GifLoaderDialogUtils.showMyDialog(context); ClinicListService ancillaryOrdersService = new ClinicListService(); ancillaryOrdersService.getProjectIDFromNFC(nfcID).then((response) { - print(response["GetProjectByNFC"]); - int projectID = response['GetProjectByNFC'][0]["ProjectID"]; - GifLoaderDialogUtils.hideDialog(context); - Navigator.push(context, FadePage(page: EROnlineCheckInPaymentDetails(projectID: projectID))); + if (response["GetProjectByNFC"].length != 0) { + print(response["GetProjectByNFC"]); + int projectID = response['GetProjectByNFC'][0]["ProjectID"]; + GifLoaderDialogUtils.hideDialog(context); + Navigator.push(context, FadePage(page: EROnlineCheckInPaymentDetails(projectID: projectID))); + } else { + AppToast.showErrorToast(message: "Invalid NFC Card Scanned."); + } }).catchError((err) { AppToast.showErrorToast(message: err.toString()); GifLoaderDialogUtils.hideDialog(context);