|
|
|
|
@ -62,13 +62,9 @@ class _QRCodeState extends State<QRCode> {
|
|
|
|
|
// _bytes = base64.decode(widget.appoQR.split(',').last);
|
|
|
|
|
widget.authUser = new AuthenticatedUser();
|
|
|
|
|
|
|
|
|
|
FlutterNfcKit.nfcAvailability.then((value) {
|
|
|
|
|
_supportsNFC = (value == NFCAvailability.available);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
|
|
|
|
// WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
|
|
|
|
// startNFCScan();
|
|
|
|
|
});
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
super.initState();
|
|
|
|
|
}
|
|
|
|
|
@ -113,6 +109,9 @@ class _QRCodeState extends State<QRCode> {
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
projectViewModel = Provider.of(context);
|
|
|
|
|
_context = context;
|
|
|
|
|
FlutterNfcKit.nfcAvailability.then((value) {
|
|
|
|
|
_supportsNFC = (value == NFCAvailability.available);
|
|
|
|
|
});
|
|
|
|
|
List<Widget> checkInOptionsList = getCheckInOptionsList(context);
|
|
|
|
|
return AppScaffold(
|
|
|
|
|
appBarTitle: TranslationBase.of(context).onlineCheckIn,
|
|
|
|
|
@ -214,8 +213,10 @@ class _QRCodeState extends State<QRCode> {
|
|
|
|
|
optionsList.add(
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
if (projectViewModel.havePrivilege(80)) {
|
|
|
|
|
if (projectViewModel.havePrivilege(80) && _supportsNFC) {
|
|
|
|
|
startNFCScan();
|
|
|
|
|
} else {
|
|
|
|
|
Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
|