diff --git a/lib/pages/destination/destination_controller.dart b/lib/pages/destination/destination_controller.dart index e00fdc2..3a1ca98 100644 --- a/lib/pages/destination/destination_controller.dart +++ b/lib/pages/destination/destination_controller.dart @@ -37,6 +37,8 @@ class DestinationController extends GetxController { double currentLat = 0.0; double currentLon = 0.0; + bool gps_push_started = false; + bool skip_10s = false; List currentSelectedDestinations = [].obs; @@ -571,7 +573,9 @@ class DestinationController extends GetxController { break; } } - pushGPStoServer(); + if (gps_push_started == false) { + pushGPStoServer(); + } //print("--- 123 ---- $skip_gps----"); } catch (e) { //print("An error occurred: $e"); @@ -585,6 +589,7 @@ class DestinationController extends GetxController { Future pushGPStoServer() async { try { await Future.delayed(const Duration(minutes: 5)); + gps_push_started = true; ExternalService().pushGPS(); } catch (e) { //print("An error occurred: $e"); diff --git a/pubspec.yaml b/pubspec.yaml index 6d83729..eab8eea 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.25+25 +version: 1.0.26+26 environment: sdk: ">=3.1.0 <4.0.0"