diff --git a/lib/pages/BookAppointment/QRCode.dart b/lib/pages/BookAppointment/QRCode.dart index 0b5356a0..23b2ca6e 100644 --- a/lib/pages/BookAppointment/QRCode.dart +++ b/lib/pages/BookAppointment/QRCode.dart @@ -73,8 +73,7 @@ class _QRCodeState extends State { height: MediaQuery.of(context).size.width / 3, child: Row( children: [ - _supportsNFC - ? Expanded( + Expanded( flex: 1, child: Row( crossAxisAlignment: CrossAxisAlignment.center, @@ -92,20 +91,20 @@ class _QRCodeState extends State { child: Image.asset("assets/images/nfc/ic_nfc.png"), ), onTap: () { - locator().analytics.todoList.to_do_list_nfc(widget.appointment); showNfcReader(context, onNcfScan: (String nfcId) { Future.delayed(const Duration(milliseconds: 100), () { sendNfcCheckInRequest(nfcId); + locator().analytics.todoList.to_do_list_nfc(widget.appointment); }); }, onCancel: (){ + Navigator.of(context).pop(); locator().analytics.todoList.to_do_list_nfc_cancel(widget.appointment); }); }, ), ], ), - ) - : Container(), + ), Expanded( flex: 1, child: Container(