6/22/2
This commit is contained in:
@@ -49,8 +49,6 @@ class LocationController extends GetxController {
|
||||
|
||||
// if (isActive) {
|
||||
if (double.parse(totalPoints) > -300) {
|
||||
print('total point is $totalPoints');
|
||||
|
||||
await getLocation();
|
||||
|
||||
// if (box.read(BoxName.driverID) != null) {
|
||||
@@ -73,7 +71,6 @@ class LocationController extends GetxController {
|
||||
// }
|
||||
} catch (e) {
|
||||
// Handle the error gracefully
|
||||
print('Error during location updates: $e');
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -125,21 +122,12 @@ class LocationController extends GetxController {
|
||||
// if (previousTime > 0) {
|
||||
// double distance = calculateDistanceInKmPerHour(
|
||||
// previousTime, _locationData.time, speed);
|
||||
// print('distance $distance');
|
||||
// totalDistance += distance;
|
||||
// }
|
||||
// // print('totalDistance: $totalDistance');
|
||||
|
||||
// previousTime = _locationData.time!;
|
||||
// }
|
||||
// Print location details
|
||||
// print('myLocation: ${myLocation}');
|
||||
// print('Accuracy: ${_locationData.accuracy}');
|
||||
// print('Latitude: ${_locationData.latitude}');
|
||||
// print('Longitude: ${_locationData.longitude}');
|
||||
// print('Time: ${_locationData.time}');
|
||||
print('speed: ${_locationData.speed}');
|
||||
// print('Heading: ${_locationData.heading}');
|
||||
// isLoading = false;
|
||||
update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user