added disabled feature to buttons and reset on start

This commit is contained in:
2024-02-26 20:23:58 +05:30
parent c3cb6d758c
commit 992f9f3414
5 changed files with 169 additions and 452 deletions

View File

@ -430,6 +430,10 @@ class DestinationController extends GetxController {
rogainingCounted.value = false;
DatabaseHelper db = DatabaseHelper.instance;
await db.deleteAllDestinations();
await db.deleteAllRogaining();
int? latgoal = await db.latestGoal();
if (latgoal != null) {
lastGoalAt = DateTime.fromMicrosecondsSinceEpoch(latgoal);
@ -794,6 +798,8 @@ class DestinationController extends GetxController {
orElse: () => null, // Provide a null value if no element is found
);
//print("gfs : ${gfs}");
if (gfs == null) {
return distanceToDest;
}