This commit is contained in:
Hamza-Ayed
2024-05-29 16:09:37 +03:00
parent 058fb67a41
commit 4af52f4392
44 changed files with 9509 additions and 2044 deletions

View File

@@ -445,11 +445,12 @@ class MapDriverController extends GetxController {
isRideFinished = true;
isRideStarted = false;
isPriceWindow = false;
totalCost = carType != 'Comfort' && carType != 'Mashwari'
? totalPassenger
: price < double.parse(totalPassenger)
totalCost =
carType != 'Comfort' && carType != 'Mashwari' && carType != 'Lady'
? totalPassenger
: price.toStringAsFixed(2);
: price < double.parse(totalPassenger)
? totalPassenger
: price.toStringAsFixed(2);
paymentAmount = totalCost;
box.write(BoxName.statusDriverLocation, 'off');
// changeRideToBeginToPassenger();
@@ -574,14 +575,18 @@ class MapDriverController extends GetxController {
? (i ~/ 60) +
(recentDistanceToDash *
Get.find<HomeCaptainController>().speedPrice)
: carType == 'Mashwari'
: carType == 'Lady'
? (i ~/ 60) +
(recentDistanceToDash *
Get.find<HomeCaptainController>().deliveryPrice)
: (i ~/ 60) +
(recentDistanceToDash *
Get.find<HomeCaptainController>()
.mashwariPrice); // $1 for each minute + $4 for each km
Get.find<HomeCaptainController>().comfortPrice)
: carType == 'Mashwari'
? (i ~/ 60) +
(recentDistanceToDash *
Get.find<HomeCaptainController>().deliveryPrice)
: (i ~/ 60) +
(recentDistanceToDash *
Get.find<HomeCaptainController>()
.mashwariPrice); // $1 for each minute + $4 for each km
price = (price * .10) + price; // Add 10% tax
speed = Get.find<LocationController>().speed * 3.6;
progressTimerRideBegin = i / durationOfRide;
@@ -827,6 +832,8 @@ class MapDriverController extends GetxController {
int minutes = 0;
late String carType;
late String kazan;
late String startNameLocation;
late String endNameLocation;
@override
void onInit() async {
mapAPIKEY = await storage.read(key: BoxName.mapAPIKEY);
@@ -860,6 +867,8 @@ class MapDriverController extends GetxController {
timeOfOrder = Get.arguments['timeOfOrder'];
carType = Get.arguments['carType'];
kazan = Get.arguments['kazan'];
startNameLocation = Get.arguments['startNameLocation'];
endNameLocation = Get.arguments['endNameLocation'];
var coords = passengerLocation.split(',');
var coordDestination = passengerDestination.split(',');