|  |  |  | @ -94,8 +94,12 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> { | 
		
	
		
			
				|  |  |  |  |               // if (isNfcEnabled) | 
		
	
		
			
				|  |  |  |  |               attendanceMethod("NFC", "assets/images/nfc.svg", isNfcEnabled, () { | 
		
	
		
			
				|  |  |  |  |                 if (isNfcLocationEnabled) { | 
		
	
		
			
				|  |  |  |  |                   Location.getCurrentLocation((LatLng? latlng) { | 
		
	
		
			
				|  |  |  |  |                     performNfcAttendance(widget.model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? ""); | 
		
	
		
			
				|  |  |  |  |                   Location.getCurrentLocation((LatLng? latlng, bool isMocked) { | 
		
	
		
			
				|  |  |  |  |                     if (isMocked) { | 
		
	
		
			
				|  |  |  |  |                       markFakeAttendance("NFC", latlng?.latitude.toString() ?? "", latlng?.longitude.toString() ?? ""); | 
		
	
		
			
				|  |  |  |  |                     } else { | 
		
	
		
			
				|  |  |  |  |                       performNfcAttendance(widget.model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? ""); | 
		
	
		
			
				|  |  |  |  |                     } | 
		
	
		
			
				|  |  |  |  |                   }, context); | 
		
	
		
			
				|  |  |  |  |                 } else { | 
		
	
		
			
				|  |  |  |  |                   performNfcAttendance(widget.model); | 
		
	
	
		
			
				
					|  |  |  | @ -104,8 +108,12 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> { | 
		
	
		
			
				|  |  |  |  |               if (isWifiEnabled) | 
		
	
		
			
				|  |  |  |  |                 attendanceMethod("Wifi", "assets/images/wufu.svg", isWifiEnabled, () { | 
		
	
		
			
				|  |  |  |  |                   if (isWifiLocationEnabled) { | 
		
	
		
			
				|  |  |  |  |                     Location.getCurrentLocation((LatLng? latlng) { | 
		
	
		
			
				|  |  |  |  |                       performWifiAttendance(widget.model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? ""); | 
		
	
		
			
				|  |  |  |  |                     Location.getCurrentLocation((LatLng? latlng, bool isMocked) { | 
		
	
		
			
				|  |  |  |  |                       if (isMocked) { | 
		
	
		
			
				|  |  |  |  |                         markFakeAttendance("WIFI", latlng?.latitude.toString() ?? "", latlng?.longitude.toString() ?? ""); | 
		
	
		
			
				|  |  |  |  |                       } else { | 
		
	
		
			
				|  |  |  |  |                         performWifiAttendance(widget.model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? ""); | 
		
	
		
			
				|  |  |  |  |                       } | 
		
	
		
			
				|  |  |  |  |                     }, context); | 
		
	
		
			
				|  |  |  |  |                   } else { | 
		
	
		
			
				|  |  |  |  |                     performWifiAttendance(widget.model); | 
		
	
	
		
			
				
					|  |  |  | @ -115,8 +123,12 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> { | 
		
	
		
			
				|  |  |  |  |               if (isQrEnabled) | 
		
	
		
			
				|  |  |  |  |                 attendanceMethod("QR", "assets/images/ic_qr.svg", isQrEnabled, () async { | 
		
	
		
			
				|  |  |  |  |                   if (isQrLocationEnabled) { | 
		
	
		
			
				|  |  |  |  |                     Location.getCurrentLocation((LatLng? latlng) { | 
		
	
		
			
				|  |  |  |  |                       performQrCodeAttendance(widget.model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? ""); | 
		
	
		
			
				|  |  |  |  |                     Location.getCurrentLocation((LatLng? latlng, bool isMocked) { | 
		
	
		
			
				|  |  |  |  |                       if (isMocked) { | 
		
	
		
			
				|  |  |  |  |                         markFakeAttendance("QR", latlng?.latitude.toString() ?? "", latlng?.longitude.toString() ?? ""); | 
		
	
		
			
				|  |  |  |  |                       } else { | 
		
	
		
			
				|  |  |  |  |                         performQrCodeAttendance(widget.model, lat: latlng?.latitude.toString() ?? "", lng: latlng?.longitude.toString() ?? ""); | 
		
	
		
			
				|  |  |  |  |                       } | 
		
	
		
			
				|  |  |  |  |                     }, context); | 
		
	
		
			
				|  |  |  |  |                   } else { | 
		
	
		
			
				|  |  |  |  |                     performQrCodeAttendance(widget.model); | 
		
	
	
		
			
				
					|  |  |  | @ -136,7 +148,7 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> { | 
		
	
		
			
				|  |  |  |  |         Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |         try { | 
		
	
		
			
				|  |  |  |  |           GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 2, nfcValue: nfcId, isGpsRequired: isNfcLocationEnabled, lat: lat, long: lng); | 
		
	
		
			
				|  |  |  |  |           if(g?.messageStatus != 1) { | 
		
	
		
			
				|  |  |  |  |           if (g?.messageStatus != 1) { | 
		
	
		
			
				|  |  |  |  |             Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |             showDialog( | 
		
	
		
			
				|  |  |  |  |               context: context, | 
		
	
	
		
			
				
					|  |  |  | @ -157,7 +169,6 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> { | 
		
	
		
			
				|  |  |  |  |               child: SuccessDialog(widget.isFromDashboard), | 
		
	
		
			
				|  |  |  |  |             ); | 
		
	
		
			
				|  |  |  |  |           } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |         } catch (ex) { | 
		
	
		
			
				|  |  |  |  |           print(ex); | 
		
	
		
			
				|  |  |  |  |           Utils.hideLoading(context); | 
		
	
	
		
			
				
					|  |  |  | @ -171,7 +182,7 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> { | 
		
	
		
			
				|  |  |  |  |         Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |         try { | 
		
	
		
			
				|  |  |  |  |           GenericResponseModel? g = await DashboardApiClient().markAttendance(pointType: 2, nfcValue: nfcId ?? "", isGpsRequired: isNfcLocationEnabled, lat: lat, long: lng); | 
		
	
		
			
				|  |  |  |  |           if(g?.messageStatus != 1) { | 
		
	
		
			
				|  |  |  |  |           if (g?.messageStatus != 1) { | 
		
	
		
			
				|  |  |  |  |             Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |             showDialog( | 
		
	
		
			
				|  |  |  |  |               context: context, | 
		
	
	
		
			
				
					|  |  |  | @ -276,6 +287,21 @@ class _MarkAttendanceWidgetState extends State<MarkAttendanceWidget> { | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void markFakeAttendance(String sourceName, String lat, String long) async { | 
		
	
		
			
				|  |  |  |  |     Utils.showLoading(context); | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       await DashboardApiClient().markFakeLocation(sourceName: sourceName, lat: lat, long: long); | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.confirmDialog(context, LocaleKeys.fakeLocation.tr()); | 
		
	
		
			
				|  |  |  |  |     } catch (ex) { | 
		
	
		
			
				|  |  |  |  |       print(ex); | 
		
	
		
			
				|  |  |  |  |       Utils.hideLoading(context); | 
		
	
		
			
				|  |  |  |  |       Utils.handleException(ex, context, (msg) { | 
		
	
		
			
				|  |  |  |  |         Utils.confirmDialog(context, msg); | 
		
	
		
			
				|  |  |  |  |       }); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   Widget attendanceMethod(String title, String image, bool isEnabled, VoidCallback onPress) => Container( | 
		
	
		
			
				|  |  |  |  |         decoration: BoxDecoration( | 
		
	
		
			
				|  |  |  |  |           borderRadius: BorderRadius.circular(15), | 
		
	
	
		
			
				
					|  |  |  | 
 |