updated to resume in hibernate and set gps accuray to 15m
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user