This commit is contained in:
Hamza-Ayed
2024-05-10 16:04:47 +03:00
parent 1e37b6dceb
commit d5d9ddd2cb
2 changed files with 11 additions and 33 deletions

View File

@@ -2387,12 +2387,11 @@ class MapPassengerController extends GetxController {
print('costDistance----- $costDistance');
print(
'passengerWalletTotal----- ${box.read(BoxName.passengerWalletTotal)}');
double costComfort, costSpeed, costDelivery, costMashwari, costLady = 0;
double costComfort, costSpeed, costDelivery, costLady = 0;
update();
if (currentTime.hour >= 22 && currentTime.hour < 5) {
// costDistance = distance * latePrice;
costComfort = (distance * comfortPrice) + costDuration * latePrice;
costMashwari = (distance * mashwariPrice) + costDuration * latePrice;
costSpeed = (distance * speedPrice) + costDuration * latePrice;
costDelivery = (distance * deliveryPrice) + costDuration * latePrice;
costLady = (distance * comfortPrice + 2) + costDuration * latePrice;
@@ -2402,7 +2401,6 @@ class MapPassengerController extends GetxController {
// if (averageDuration > 2.5) {
// costDistance = distance * heavyPrice;
costComfort = (distance * comfortPrice) + costDuration * heavyPrice;
costMashwari = (distance * mashwariPrice) + costDuration * heavyPrice;
costSpeed = (distance * speedPrice) + costDuration * heavyPrice;
costDelivery = (distance * deliveryPrice) + costDuration * heavyPrice;
costLady = (distance * comfortPrice + 2) + costDuration * heavyPrice;
@@ -2412,7 +2410,6 @@ class MapPassengerController extends GetxController {
} else {
// costDistance = distance * (naturePrice - .1);
costComfort = (distance * comfortPrice) + costDuration;
costMashwari = (distance * mashwariPrice) + costDuration;
costSpeed = (distance * speedPrice) + costDuration;
costDelivery = (distance * deliveryPrice) + costDuration;
costLady = (distance * comfortPrice + 2) + costDuration;
@@ -2470,6 +2467,8 @@ class MapPassengerController extends GetxController {
// buttomSheetMapPage();
changeBottomSheetShown();
} else {
print('==========================');
}
}
@@ -2609,6 +2608,7 @@ class MapPassengerController extends GetxController {
await getRideStatusFromStartApp();
startMarkerReloading();
Get.put(TextToSpeechController());
box.write(BoxName.carType, 'yet');
// await getNearestDriverByPassengerLocation();
initilizeGetStorage();