3/21/2
This commit is contained in:
@@ -650,8 +650,16 @@ update ui for totla results
|
||||
// Add a new marker with the ID `MyLocation` at the current location of the user.
|
||||
LocationController locationController = Get.find<LocationController>();
|
||||
myLocation = locationController.myLocation;
|
||||
final previousLocationOfDrivers = await sql.getCustomQuery(
|
||||
'Select * from ${TableName.carLocations} where order_id =$rideId Order by created_at DESC limit 1');
|
||||
final previousLocationOfDrivers = await sql.getCustomQuery('''SELECT
|
||||
*
|
||||
FROM
|
||||
${TableName.carLocations}
|
||||
WHERE
|
||||
order_id = $rideId
|
||||
ORDER BY
|
||||
created_at DESC
|
||||
LIMIT
|
||||
1''');
|
||||
|
||||
//get from sql
|
||||
if (previousLocationOfDrivers.isNotEmpty) {
|
||||
|
||||
@@ -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();
|
||||
// }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user