This commit is contained in:
Hamza-Ayed
2024-03-22 00:03:46 +03:00
parent 045f7e20f0
commit 5c702e7d06
8 changed files with 71 additions and 84 deletions

View File

@@ -924,20 +924,8 @@ class MapPassengerController extends GetxController {
}
delayAndFetchRideStatus(rideId);
// if (shouldFetch == false) {
// startTimer();
// update();
// }
update();
// } else {
// Get.defaultDialog(
// title: 'No Car or Driver Found in your area.'.tr,
// titleStyle: AppStyle.title,
// middleText: 'Please Try anther time '.tr,
// middleTextStyle: AppStyle.title.copyWith(color: AppColor.yellowColor),
// confirm:
// MyElevatedButton(title: 'Ok'.tr, onPressed: () => Get.back()));
// }
}
String statusRide = 'wait';
@@ -949,8 +937,8 @@ class MapPassengerController extends GetxController {
.get(link: AppLink.getRideStatus, payload: {'id': rideId});
print(res);
var decod = jsonDecode(res);
print(' 0000000000000000000000000000000000000000000000000');
print(decod['data']);
// print(' 0000000000000000000000000000000000000000000000000');
// print(decod['data']);
if (decod['data'].toString() == 'Apply') {
getUpdatedRideForDriverApply(rideId);
shouldFetch = false; // Stop further fetches
@@ -965,37 +953,12 @@ class MapPassengerController extends GetxController {
confirmRideForAllDriverAvailable();
isDriversTokensSend = true;
}
// else{
// j
// }
// else {
// Get.defaultDialog(
// barrierDismissible: false,
// title: 'There no Driver Aplly your order sorry for that '.tr,
// // middleText: 'try next time .'.tr,
// content: IconButton(
// onPressed: () {
// textToSpeechController.speakText(
// 'There no Driver Aplly your order sorry for that '.tr);
// },
// icon: const Icon(
// Icons.headphones,
// size: 40,
// ),
// ),
// titleStyle: AppStyle.title,
// confirm: MyElevatedButton(
// title: 'Back',
// onPressed: () => Get.offAll(const MapPagePassenger()),
// ));
// cancelRideAfterRejectFromAll();
// }
} else {
delayAndFetchRideStatus(
rideId); // Repeat the delay and fetch operation
update();
}
// else if (isDriversTokensSend == false) {
// delayAndFetchRideStatus(
// rideId); // Repeat the delay and fetch operation
// update();
// }
}
});
}