|
|
|
@ -24,7 +24,11 @@ class _NonHmgEmployeeSwipeViewState extends State<NonHmgEmployeeSwipeView> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void checkForNfcAndLocationPermission() async {
|
|
|
|
void checkForNfcAndLocationPermission() async {
|
|
|
|
isNfcEnabled = await NfcManager.instance.isAvailable();
|
|
|
|
try {
|
|
|
|
|
|
|
|
isNfcEnabled = await NfcManager.instance.isAvailable();
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
isNfcEnabled = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
@ -52,7 +56,7 @@ class _NonHmgEmployeeSwipeViewState extends State<NonHmgEmployeeSwipeView> {
|
|
|
|
shrinkWrap: true,
|
|
|
|
shrinkWrap: true,
|
|
|
|
padding: const EdgeInsets.only(bottom: 0, top: 16),
|
|
|
|
padding: const EdgeInsets.only(bottom: 0, top: 16),
|
|
|
|
gridDelegate:
|
|
|
|
gridDelegate:
|
|
|
|
SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: (MediaQuery.of(context).size.width < 550) ? 3 : 5, childAspectRatio: 1 / 1, crossAxisSpacing: 16, mainAxisSpacing: 16),
|
|
|
|
SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: (MediaQuery.of(context).size.width < 550) ? 3 : 5, childAspectRatio: 1 / 1, crossAxisSpacing: 16, mainAxisSpacing: 16),
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
gridItem("Nfc", Icons.nfc, isNfcEnabled).onPress(isNfcEnabled ? () {} : null),
|
|
|
|
gridItem("Nfc", Icons.nfc, isNfcEnabled).onPress(isNfcEnabled ? () {} : null),
|
|
|
|
gridItem("Qr Scan", Icons.qr_code, true).onPress(() {}),
|
|
|
|
gridItem("Qr Scan", Icons.qr_code, true).onPress(() {}),
|
|
|
|
|