|
|
|
@ -74,7 +74,7 @@ class _QRCodeState extends State<QRCode> {
|
|
|
|
Future.delayed(const Duration(milliseconds: 500), () {
|
|
|
|
Future.delayed(const Duration(milliseconds: 500), () {
|
|
|
|
showNfcReader(context, onNcfScan: (String nfcId) {
|
|
|
|
showNfcReader(context, onNcfScan: (String nfcId) {
|
|
|
|
Future.delayed(const Duration(milliseconds: 100), () {
|
|
|
|
Future.delayed(const Duration(milliseconds: 100), () {
|
|
|
|
sendNfcCheckInRequest(nfcId, 2);
|
|
|
|
sendNfcCheckInRequest(nfcId, 1);
|
|
|
|
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment!);
|
|
|
|
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment!);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}, onCancel: () {
|
|
|
|
}, onCancel: () {
|
|
|
|
@ -100,7 +100,7 @@ class _QRCodeState extends State<QRCode> {
|
|
|
|
double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude!), double.parse(projectDetailListModel.longitude!)).ceilToDouble() * 1000;
|
|
|
|
double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude!), double.parse(projectDetailListModel.longitude!)).ceilToDouble() * 1000;
|
|
|
|
print(dist);
|
|
|
|
print(dist);
|
|
|
|
if (dist <= projectDetailListModel.geofenceRadius!) {
|
|
|
|
if (dist <= projectDetailListModel.geofenceRadius!) {
|
|
|
|
sendNfcCheckInRequest(projectDetailListModel.checkInQrCode!, 2);
|
|
|
|
sendNfcCheckInRequest(projectDetailListModel.checkInQrCode!, 3);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
AppToast.showErrorToast(message: TranslationBase.of(context).locationCheckInError);
|
|
|
|
AppToast.showErrorToast(message: TranslationBase.of(context).locationCheckInError);
|
|
|
|
@ -162,7 +162,7 @@ class _QRCodeState extends State<QRCode> {
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
showNfcReader(context, onNcfScan: (String nfcId) {
|
|
|
|
showNfcReader(context, onNcfScan: (String nfcId) {
|
|
|
|
Future.delayed(const Duration(milliseconds: 100), () {
|
|
|
|
Future.delayed(const Duration(milliseconds: 100), () {
|
|
|
|
sendNfcCheckInRequest(nfcId, 2);
|
|
|
|
sendNfcCheckInRequest(nfcId, 1);
|
|
|
|
|
|
|
|
|
|
|
|
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment!);
|
|
|
|
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment!);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|