fix gps updated
This commit is contained in:
@ -37,6 +37,8 @@ class DestinationController extends GetxController {
|
|||||||
double currentLat = 0.0;
|
double currentLat = 0.0;
|
||||||
double currentLon = 0.0;
|
double currentLon = 0.0;
|
||||||
|
|
||||||
|
bool gps_push_started = false;
|
||||||
|
|
||||||
bool skip_10s = false;
|
bool skip_10s = false;
|
||||||
|
|
||||||
List<Destination> currentSelectedDestinations = <Destination>[].obs;
|
List<Destination> currentSelectedDestinations = <Destination>[].obs;
|
||||||
@ -571,7 +573,9 @@ class DestinationController extends GetxController {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (gps_push_started == false) {
|
||||||
pushGPStoServer();
|
pushGPStoServer();
|
||||||
|
}
|
||||||
//print("--- 123 ---- $skip_gps----");
|
//print("--- 123 ---- $skip_gps----");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
//print("An error occurred: $e");
|
//print("An error occurred: $e");
|
||||||
@ -585,6 +589,7 @@ class DestinationController extends GetxController {
|
|||||||
Future<void> pushGPStoServer() async {
|
Future<void> pushGPStoServer() async {
|
||||||
try {
|
try {
|
||||||
await Future.delayed(const Duration(minutes: 5));
|
await Future.delayed(const Duration(minutes: 5));
|
||||||
|
gps_push_started = true;
|
||||||
ExternalService().pushGPS();
|
ExternalService().pushGPS();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
//print("An error occurred: $e");
|
//print("An error occurred: $e");
|
||||||
|
|||||||
@ -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.
|
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||||
# Read more about iOS versioning at
|
# Read more about iOS versioning at
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
version: 1.0.25+25
|
version: 1.0.26+26
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.1.0 <4.0.0"
|
sdk: ">=3.1.0 <4.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user