This commit is contained in:
Hamza-Ayed
2024-03-21 02:09:52 +03:00
parent ad062d9ad7
commit 045f7e20f0
46 changed files with 2767 additions and 877 deletions

View File

@@ -58,7 +58,7 @@ class HomeCaptainController extends GetxController {
isActive = !isActive;
if (isActive) {
if (double.parse(totalPoints) > -500) {
if (double.parse(totalPoints) > -300) {
locationController.startLocationUpdates();
activeStartTime = DateTime.now();
activeTimer = Timer.periodic(const Duration(seconds: 1), (timer) {
@@ -105,7 +105,7 @@ class HomeCaptainController extends GetxController {
await sql.getCustomQuery(customQuery);
countRefuse = results[0]['count'].toString();
update();
if (int.parse(countRefuse) > 3 || double.parse(totalPoints) <= -500) {
if (int.parse(countRefuse) > 3 || double.parse(totalPoints) <= -300) {
print('total point is $totalPoints');
locationController.stopLocationUpdates();
activeStartTime = null;
@@ -202,8 +202,8 @@ class HomeCaptainController extends GetxController {
getAllPayment();
startPeriodicExecution();
onMapCreated(mapHomeCaptaiController);
getRefusedOrderByCaptain();
totalPoints = Get.find<CaptainWalletController>().totalPoints;
getRefusedOrderByCaptain();
// LocationController().getLocation();
super.onInit();
}