|  |  |  | @ -85,14 +85,14 @@ class SwipeGeneralUtils { | 
		
	
		
			
				|  |  |  |  |     ); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void showErrorDialog({String ?message, required BuildContext context}) { | 
		
	
		
			
				|  |  |  |  |   void showErrorDialog({String? message, required BuildContext context}) { | 
		
	
		
			
				|  |  |  |  |     showDialog( | 
		
	
		
			
				|  |  |  |  |       context: context, | 
		
	
		
			
				|  |  |  |  |       builder: (context) => ConfirmDialog(message: message, title: 'Error', onTap: () => Navigator.pop(context)), | 
		
	
		
			
				|  |  |  |  |     ); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void showMDialog(context, {Widget ?child, Color? backgroundColor, bool isDismissable = true, bool isBusniessCard = false}) async { | 
		
	
		
			
				|  |  |  |  |   void showMDialog(context, {Widget? child, Color? backgroundColor, bool isDismissable = true, bool isBusniessCard = false}) async { | 
		
	
		
			
				|  |  |  |  |     return showDialog( | 
		
	
		
			
				|  |  |  |  |       context: context, | 
		
	
		
			
				|  |  |  |  |       barrierDismissible: isDismissable, | 
		
	
	
		
			
				
					|  |  |  | @ -137,7 +137,7 @@ class SwipeGeneralUtils { | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   //huawei permission part.... | 
		
	
		
			
				|  |  |  |  |   void getHuaweiCurrentLocation({SwipeTypeEnum ?attendanceType, required BuildContext context}) async { | 
		
	
		
			
				|  |  |  |  |   void getHuaweiCurrentLocation({SwipeTypeEnum? attendanceType, required BuildContext context}) async { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       showLoading(context); | 
		
	
		
			
				|  |  |  |  |       FusedLocationProviderClient locationService = FusedLocationProviderClient()..initFusedLocationService(); | 
		
	
	
		
			
				
					|  |  |  | @ -153,7 +153,7 @@ class SwipeGeneralUtils { | 
		
	
		
			
				|  |  |  |  |         (Location location) async { | 
		
	
		
			
				|  |  |  |  |           hideLoading(context); | 
		
	
		
			
				|  |  |  |  |           await locationService.removeLocationUpdates(requestCode); | 
		
	
		
			
				|  |  |  |  |           handleSwipeOperation(swipeType: attendanceType!, context: context, lat: location.latitude??0, long: location.longitude??0); | 
		
	
		
			
				|  |  |  |  |           handleSwipeOperation(swipeType: attendanceType!, context: context, lat: location.latitude ?? 0, long: location.longitude ?? 0); | 
		
	
		
			
				|  |  |  |  |           requestCode = 0; | 
		
	
		
			
				|  |  |  |  |           _streamSubscription.cancel(); | 
		
	
		
			
				|  |  |  |  |         }, | 
		
	
	
		
			
				
					|  |  |  | @ -173,7 +173,7 @@ class SwipeGeneralUtils { | 
		
	
		
			
				|  |  |  |  |     return (result[Permission.location] == PermissionStatus.granted || result[Permission.locationAlways] == PermissionStatus.granted); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void checkHuaweiLocationPermission({required SwipeTypeEnum attendanceType,required  BuildContext context}) async { | 
		
	
		
			
				|  |  |  |  |   void checkHuaweiLocationPermission({required SwipeTypeEnum attendanceType, required BuildContext context}) async { | 
		
	
		
			
				|  |  |  |  |     // Permission_Handler permissionHandler = PermissionHandler(); | 
		
	
		
			
				|  |  |  |  |     LocationUtilities.isEnabled((bool isEnabled) async { | 
		
	
		
			
				|  |  |  |  |       if (isEnabled) { | 
		
	
	
		
			
				
					|  |  |  | @ -231,7 +231,7 @@ class SwipeGeneralUtils { | 
		
	
		
			
				|  |  |  |  |     // } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void handleSwipeOperation({required SwipeTypeEnum swipeType,required double lat,required double long,required  BuildContext context}) { | 
		
	
		
			
				|  |  |  |  |   void handleSwipeOperation({required SwipeTypeEnum swipeType, required double lat, required double long, required BuildContext context}) { | 
		
	
		
			
				|  |  |  |  |     switch (swipeType) { | 
		
	
		
			
				|  |  |  |  |       case SwipeTypeEnum.NFC: | 
		
	
		
			
				|  |  |  |  |         handleNfcAttendance(latitude: lat, longitude: long, context: context); | 
		
	
	
		
			
				
					|  |  |  | @ -249,7 +249,7 @@ class SwipeGeneralUtils { | 
		
	
		
			
				|  |  |  |  |     return DateFormat.Hms().format(dateTime); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   Future<void> performQrCodeAttendance({double ?latitude, double? longitude,required  BuildContext context}) async { | 
		
	
		
			
				|  |  |  |  |   Future<void> performQrCodeAttendance({double? latitude, double? longitude, required BuildContext context}) async { | 
		
	
		
			
				|  |  |  |  |     UserProvider userProvider = Provider.of<UserProvider>(context, listen: false); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     String qrCodeValue = await Navigator.of(context).push( | 
		
	
	
		
			
				
					|  |  |  | @ -267,7 +267,7 @@ class SwipeGeneralUtils { | 
		
	
		
			
				|  |  |  |  |         ); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |         await userProvider.makeSwipe(model: swipeModel).then((swipeResponse) { | 
		
	
		
			
				|  |  |  |  |           if (swipeResponse.isSuccess==true) { | 
		
	
		
			
				|  |  |  |  |           if (swipeResponse.isSuccess == true) { | 
		
	
		
			
				|  |  |  |  |             hideLoading(context); | 
		
	
		
			
				|  |  |  |  |             Navigator.pushNamed(context, SwipeSuccessView.routeName); | 
		
	
		
			
				|  |  |  |  |           } else { | 
		
	
	
		
			
				
					|  |  |  | @ -294,7 +294,7 @@ class SwipeGeneralUtils { | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   Future<void> handleNfcAttendance({double ?latitude = 0, double? longitude = 0,required  BuildContext context}) async { | 
		
	
		
			
				|  |  |  |  |   Future<void> handleNfcAttendance({double? latitude = 0, double? longitude = 0, required BuildContext context}) async { | 
		
	
		
			
				|  |  |  |  |     // UserProvider _userProvider = Provider.of<UserProvider>(context,listen:false); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     if (Platform.isIOS) { | 
		
	
	
		
			
				
					|  |  |  | @ -310,8 +310,8 @@ class SwipeGeneralUtils { | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   Future<void> _processNfcAttendance( | 
		
	
		
			
				|  |  |  |  |     String nfcId, | 
		
	
		
			
				|  |  |  |  |     double ?latitude, | 
		
	
		
			
				|  |  |  |  |     double ?longitude, | 
		
	
		
			
				|  |  |  |  |     double? latitude, | 
		
	
		
			
				|  |  |  |  |     double? longitude, | 
		
	
		
			
				|  |  |  |  |     BuildContext context, | 
		
	
		
			
				|  |  |  |  |   ) async { | 
		
	
		
			
				|  |  |  |  |     showLoading(context); | 
		
	
	
		
			
				
					|  |  |  | @ -321,7 +321,7 @@ class SwipeGeneralUtils { | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |       final swipeResponse = await userProvider.makeSwipe(model: swipeModel); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |       if (swipeResponse.isSuccess==true) { | 
		
	
		
			
				|  |  |  |  |       if (swipeResponse.isSuccess == true) { | 
		
	
		
			
				|  |  |  |  |         hideLoading(context); | 
		
	
		
			
				|  |  |  |  |         Navigator.pushNamed(context, SwipeSuccessView.routeName); | 
		
	
		
			
				|  |  |  |  |       } else { | 
		
	
	
		
			
				
					|  |  |  | @ -405,7 +405,7 @@ class SwipeGeneralUtils { | 
		
	
		
			
				|  |  |  |  |       }, context)); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |     if (kDebugMode) { | 
		
	
		
			
				|  |  |  |  |       userProvider.user!.enableWifi!= true; | 
		
	
		
			
				|  |  |  |  |       userProvider.user!.enableWifi != true; | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     if (userProvider.user!.enableWifi!) { | 
		
	
	
		
			
				
					|  |  |  | @ -448,7 +448,7 @@ class SwipeGeneralUtils { | 
		
	
		
			
				|  |  |  |  |     ); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   void readNFc({Function(String) ?onRead}) { | 
		
	
		
			
				|  |  |  |  |   void readNFc({Function(String)? onRead}) { | 
		
	
		
			
				|  |  |  |  |     NfcManager.instance.startSession(onDiscovered: (NfcTag tag) async { | 
		
	
		
			
				|  |  |  |  |       MifareUltralight f; | 
		
	
		
			
				|  |  |  |  |       if (Platform.isAndroid) { | 
		
	
	
		
			
				
					|  |  |  | @ -497,7 +497,7 @@ class SwipeGeneralUtils { | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |         final swipeResponse = await userProvider.makeSwipe(model: swipeModel); | 
		
	
		
			
				|  |  |  |  |         await closeWifiRequest(); | 
		
	
		
			
				|  |  |  |  |         if (swipeResponse.isSuccess==true) { | 
		
	
		
			
				|  |  |  |  |         if (swipeResponse.isSuccess == true) { | 
		
	
		
			
				|  |  |  |  |           hideLoading(context); | 
		
	
		
			
				|  |  |  |  |           Navigator.pushNamed(context, SwipeSuccessView.routeName); | 
		
	
		
			
				|  |  |  |  |         } else { | 
		
	
	
		
			
				
					|  |  |  | 
 |