We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setLocation(double lat, double long, dynamic radius) async { latitudeController.text = lat.toString(); longitudeController.text = long.toString(); radiusController.text = radius.toString();
await geofenceStatusSubscription?.cancel(); setState(() { isLocation = false; isFenceCalled = true; todaysAttendanceViewModel.setFenceCall(isFenceCalled); print("starting geoFencing Service"); EasyGeofencing.startGeofenceService( pointedLatitude: latitudeController.text, pointedLongitude: longitudeController.text, radiusMeter: radiusController.text, eventPeriodInSeconds: 5, ); }); var originalStream = EasyGeofencing.getGeofenceStream(); if (originalStream != null) { geofenceStatusSubscription = originalStream.asBroadcastStream().listen((GeofenceStatus status) { setState(() { geofenceStatus = status.toString(); if (geofenceStatus == "GeofenceStatus.enter") { isInsideOfFence = true; todaysAttendanceViewModel.setIsInside(isInsideOfFence); isLoginButtonPressed = false; } else if (geofenceStatus == "GeofenceStatus.exit") { isInsideOfFence = false; todaysAttendanceViewModel.setIsInside(isInsideOfFence); isLoginButtonPressed = false; } }); }); }
}
Future getLatLonData() async { latLonModel = await AttendanceServices().getLatLon( userViewModel.userLoginCred.foo, empInfoListProvider.empModel.companyCode!, empInfoListProvider.empModel.plantCode!, ); latLongDetails = latLonModel?.latLongDetails; var lat, long, radius; if (latLongDetails != null) { for (var i = 0; i < latLongDetails!.length; i++) { lat = latLongDetails![i].latitude; long = latLongDetails![i].longitude; radius = latLongDetails![i].radius; setState(() { isInsideOfFence = false; // Reset isInsideOfFence }); await setLocation(lat, long, radius); } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
setLocation(double lat, double long, dynamic radius) async {
latitudeController.text = lat.toString();
longitudeController.text = long.toString();
radiusController.text = radius.toString();
}
Future getLatLonData() async {
latLonModel = await AttendanceServices().getLatLon(
userViewModel.userLoginCred.foo,
empInfoListProvider.empModel.companyCode!,
empInfoListProvider.empModel.plantCode!,
);
latLongDetails = latLonModel?.latLongDetails;
var lat, long, radius;
if (latLongDetails != null) {
for (var i = 0; i < latLongDetails!.length; i++) {
lat = latLongDetails![i].latitude;
long = latLongDetails![i].longitude;
radius = latLongDetails![i].radius;
setState(() {
isInsideOfFence = false; // Reset isInsideOfFence
});
await setLocation(lat, long, radius);
}
}
}
The text was updated successfully, but these errors were encountered: