|
|
|
|
@ -77,7 +77,7 @@ class _QRCodeState extends State<QRCode> {
|
|
|
|
|
Future.delayed(const Duration(milliseconds: 500), () {
|
|
|
|
|
showNfcReader(context, onNcfScan: (String nfcId) {
|
|
|
|
|
Future.delayed(const Duration(milliseconds: 100), () {
|
|
|
|
|
sendNfcCheckInRequest(nfcId);
|
|
|
|
|
sendNfcCheckInRequest(nfcId, 1);
|
|
|
|
|
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
|
|
|
|
|
});
|
|
|
|
|
}, onCancel: () {
|
|
|
|
|
@ -90,7 +90,7 @@ class _QRCodeState extends State<QRCode> {
|
|
|
|
|
startQRCodeScan() async {
|
|
|
|
|
String onlineCheckInQRCode = (await BarcodeScanner.scan())?.rawContent;
|
|
|
|
|
if (onlineCheckInQRCode != "") {
|
|
|
|
|
sendNfcCheckInRequest(onlineCheckInQRCode);
|
|
|
|
|
sendNfcCheckInRequest(onlineCheckInQRCode, 2);
|
|
|
|
|
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
|
|
|
|
|
} else {}
|
|
|
|
|
}
|
|
|
|
|
@ -102,7 +102,7 @@ class _QRCodeState extends State<QRCode> {
|
|
|
|
|
double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude), double.parse(projectDetailListModel.longitude)).ceilToDouble() * 1000;
|
|
|
|
|
print(dist);
|
|
|
|
|
if (dist <= projectDetailListModel.geofenceRadius) {
|
|
|
|
|
sendNfcCheckInRequest(projectDetailListModel.checkInQrCode);
|
|
|
|
|
sendNfcCheckInRequest(projectDetailListModel.checkInQrCode, 3);
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showErrorToast(message: TranslationBase.of(context).locationCheckInError);
|
|
|
|
|
}
|
|
|
|
|
@ -341,12 +341,12 @@ class _QRCodeState extends State<QRCode> {
|
|
|
|
|
return docSpeciality;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sendNfcCheckInRequest(String nfcId) {
|
|
|
|
|
sendNfcCheckInRequest(String nfcId, int checkInBy) {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
|
|
|
|
|
DoctorsListService service = new DoctorsListService();
|
|
|
|
|
|
|
|
|
|
service.sendCheckinNfcRequest(widget.patientShareResponse.appointmentNo, nfcId, widget.patientShareResponse.projectID, context).then((res) {
|
|
|
|
|
service.sendCheckinNfcRequest(widget.patientShareResponse.appointmentNo, nfcId, widget.patientShareResponse.projectID, checkInBy, context).then((res) {
|
|
|
|
|
print(res);
|
|
|
|
|
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
|