update goal condition for more that 1000 m away
This commit is contained in:
@ -46,6 +46,7 @@ class DestinationController extends GetxController {
|
||||
|
||||
static bool gps_push_started = false;
|
||||
static bool game_started = false;
|
||||
static bool ready_for_goal = false;
|
||||
|
||||
bool skip_10s = false;
|
||||
|
||||
@ -420,6 +421,7 @@ class DestinationController extends GetxController {
|
||||
isAtGoal.value = false;
|
||||
isGpsSelected.value = true;
|
||||
skipGps = false;
|
||||
ready_for_goal = false;
|
||||
|
||||
_start = 0;
|
||||
chekcs = 0;
|
||||
@ -744,6 +746,10 @@ class DestinationController extends GetxController {
|
||||
|
||||
void handleLocationUpdate(Position? position) async {
|
||||
if (position != null) {
|
||||
if (distanceToStart() >= 1000) {
|
||||
ready_for_goal = true;
|
||||
}
|
||||
|
||||
var distance = const Distance();
|
||||
double distanceToDest = distance.as(
|
||||
LengthUnit.Meter,
|
||||
|
||||
Reference in New Issue
Block a user