5/31/2
This commit is contained in:
@@ -217,6 +217,7 @@ class MapPassengerController extends GetxController {
|
||||
late double totalPassengerComfortDiscount = 0;
|
||||
late double totalPassengerLadyDiscount = 0;
|
||||
late double totalPassengerSpeedDiscount = 0;
|
||||
late double totalPassengerRaihGaiDiscount = 0;
|
||||
late double totalPassengerMotoDelivery = 0;
|
||||
late double totalDriver = 0;
|
||||
late double averageDuration = 0;
|
||||
@@ -2075,7 +2076,10 @@ class MapPassengerController extends GetxController {
|
||||
late LatLngBounds boundsData;
|
||||
late String startNameAddress = '';
|
||||
late String endNameAddress = '';
|
||||
|
||||
getMap(String origin, destination) async {
|
||||
isLoading = true;
|
||||
update();
|
||||
remainingTime = 25; //to make cancel every call
|
||||
await getCarsLocationByPassengerAndReloadMarker();
|
||||
// //print(carsLocationByPassenger);
|
||||
@@ -2382,6 +2386,7 @@ class MapPassengerController extends GetxController {
|
||||
double costForDriver = 0;
|
||||
double totalPassengerSpeed = 0;
|
||||
double totalPassengerLady = 0;
|
||||
double totalPassengerRayehGai = 0;
|
||||
Future bottomSheet() async {
|
||||
if (data.isNotEmpty) {
|
||||
durationToAdd = Duration(seconds: durationToRide);
|
||||
@@ -2396,9 +2401,10 @@ class MapPassengerController extends GetxController {
|
||||
costDuration = (durationToRide / 60).floorToDouble();
|
||||
print('costDuration----- $costDuration');
|
||||
print('costDistance----- $costDistance');
|
||||
print('Distance----- $distance');
|
||||
print(
|
||||
'passengerWalletTotal----- ${box.read(BoxName.passengerWalletTotal)}');
|
||||
double costComfort, costSpeed, costDelivery, costLady = 0;
|
||||
double costComfort, costSpeed, costDelivery, costLady, costRayehGai = 0;
|
||||
update();
|
||||
if (currentTime.hour >= 22 && currentTime.hour < 5) {
|
||||
// costDistance = distance * latePrice;
|
||||
@@ -2406,6 +2412,9 @@ class MapPassengerController extends GetxController {
|
||||
costSpeed = (distance * speedPrice) + costDuration * latePrice;
|
||||
costDelivery = (distance * deliveryPrice) + costDuration * latePrice;
|
||||
costLady = (distance * comfortPrice + 2) + costDuration * latePrice;
|
||||
costRayehGai = (distance * 2 * speedPrice) -
|
||||
((distance * 2 * speedPrice) * .3) +
|
||||
costDuration * latePrice;
|
||||
|
||||
update();
|
||||
} else if (currentTime.hour >= 13 && currentTime.hour <= 16) {
|
||||
@@ -2415,6 +2424,9 @@ class MapPassengerController extends GetxController {
|
||||
costSpeed = (distance * speedPrice) + costDuration * heavyPrice;
|
||||
costDelivery = (distance * deliveryPrice) + costDuration * heavyPrice;
|
||||
costLady = (distance * comfortPrice + 2) + costDuration * heavyPrice;
|
||||
costRayehGai = (distance * 2 * speedPrice) -
|
||||
((distance * 2 * speedPrice) * .3) +
|
||||
costDuration * heavyPrice;
|
||||
|
||||
update();
|
||||
// } /
|
||||
@@ -2424,6 +2436,9 @@ class MapPassengerController extends GetxController {
|
||||
costSpeed = (distance * speedPrice) + costDuration;
|
||||
costDelivery = (distance * deliveryPrice) + costDuration;
|
||||
costLady = (distance * comfortPrice + 2) + costDuration;
|
||||
costRayehGai = (distance * 2 * speedPrice) -
|
||||
((distance * 2 * speedPrice) * .3) +
|
||||
costDuration;
|
||||
update();
|
||||
}
|
||||
//print('cost $cost');
|
||||
@@ -2436,12 +2451,16 @@ class MapPassengerController extends GetxController {
|
||||
totalPassengerLady = (costLady + (costLady * kazan / 100)).ceilToDouble();
|
||||
totalPassengerSpeed =
|
||||
(costSpeed + (costSpeed * kazan / 100)).ceilToDouble();
|
||||
totalPassengerRayehGai =
|
||||
(costRayehGai + (costRayehGai * kazan / 100)).ceilToDouble();
|
||||
totalPassengerComfortDiscount =
|
||||
totalPassengerComfort + totalPassengerComfort * (kazan - 0) / 100;
|
||||
totalPassengerLadyDiscount =
|
||||
totalPassengerLady + totalPassengerLady * (kazan - 0) / 100;
|
||||
totalPassengerSpeedDiscount =
|
||||
totalPassengerSpeed + totalPassengerSpeed * (kazan - 2) / 100;
|
||||
totalPassengerRaihGaiDiscount =
|
||||
totalPassengerRayehGai + totalPassengerRayehGai * (kazan - 2) / 100;
|
||||
totalPassengerMotoDelivery =
|
||||
(costDelivery + (costDelivery * kazan / 100)).ceilToDouble();
|
||||
totalPassengerComfort = totalPassengerComfortDiscount -
|
||||
|
||||
@@ -4,6 +4,18 @@ class MyTranslation extends Translations {
|
||||
@override
|
||||
Map<String, Map<String, String>> get keys => {
|
||||
"ar": {
|
||||
"Best choice for cities": "أفضل اختيار للمدن",
|
||||
"Rayeh Gai: Round trip service for convenient travel between cities, easy and reliable.":
|
||||
" رايح جاي: خدمة ذهاب وعودة للسفر المريح بين المدن، سهلة وموثوقة.",
|
||||
"Rayeh Gai": "رايح جاي ",
|
||||
"This trip is for women only": "هذه الرحلة للنساء فقط",
|
||||
"Total budgets on month": "إجمالي الميزانية لهذا الشهر",
|
||||
"You have call from driver": " لديك مكالمة من السائق",
|
||||
"Comfort": "كمفورت",
|
||||
"Speed": "سبيد",
|
||||
"Lady": "ليدي",
|
||||
"Delivery": "توصيل",
|
||||
"Mashwari": "مشواري",
|
||||
'The driver waiting you in picked location .':
|
||||
"السائق ينتظرك في موقع الركوب.",
|
||||
'About Us': "نبذة عنا",
|
||||
|
||||
Reference in New Issue
Block a user