updated to resume in hibernate and set gps accuray to 15m

This commit is contained in:
2024-02-06 15:22:27 +05:30
parent 494b27bf9e
commit cfa9e055f5
3 changed files with 18 additions and 8 deletions

View File

@ -117,7 +117,9 @@ class LocationController extends GetxController {
// print(position == null
// ? 'Unknown'
// : '${position.latitude.toString()}, ${position.longitude.toString()}');
currentPosition.value = position;
if (position?.accuracy != null && position!.accuracy <= 15) {
currentPosition.value = position;
}
// LogManager().addLog(
// "GPS : ${position!.latitude.toString()}, ${position.longitude.toString()} - ${DateTime.now().hour}:${DateTime.now().minute}:${DateTime.now().second}:${DateTime.now().microsecond}");
@ -125,8 +127,8 @@ class LocationController extends GetxController {
// Resume stream if it was paused previously
if (isStreamPaused) {
positionStream?.resume();
isStreamPaused = false;
positionStream.resume();
}
}