This commit is contained in:
Hamza Aleghwairyeen
2024-04-06 12:50:44 +03:00
parent 03c2289653
commit c7595de6c3
11 changed files with 149 additions and 44 deletions

View File

@@ -443,7 +443,9 @@ class MapDriverController extends GetxController {
isRideFinished = true;
isRideStarted = false;
isPriceWindow = false;
totalCost = price.toStringAsFixed(2);
totalCost = carType == 'Comfort' || carType == 'Free Ride'
? price.toStringAsFixed(1)
: totalPassenger;
paymentAmount = totalCost;
box.write(BoxName.statusDriverLocation, 'off');
// changeRideToBeginToPassenger();
@@ -470,7 +472,9 @@ class MapDriverController extends GetxController {
Future.delayed(const Duration(milliseconds: 300));
FirebaseMessagesController().sendNotificationToPassengerToken(
'Driver Finish Trip',
'you will pay to Driver'.tr + ' $price \$'.tr,
'you will pay to Driver'.tr +
' ${carType == 'Comfort' || carType == 'Free Ride' ? price.toStringAsFixed(1) : totalPassenger} \$'
.tr,
tokenPassenger,
[
box.read(BoxName.driverID),