This commit is contained in:
Hamza-Ayed
2024-09-04 17:22:56 +03:00
parent e23709c924
commit 2098aeda23
3 changed files with 78 additions and 19 deletions

View File

@@ -41,7 +41,7 @@
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>4.3.48</string> <string>4.3.47</string>
<key>FirebaseAppDelegateProxyEnabled</key> <key>FirebaseAppDelegateProxyEnabled</key>
<string>NO</string> <string>NO</string>
<key>GMSApiKey</key> <key>GMSApiKey</key>

View File

@@ -3287,7 +3287,29 @@ class MapPassengerController extends GetxController {
costLady, costLady,
costRayehGai = 0; costRayehGai = 0;
update(); update();
if (currentTime.hour >= 22 && currentTime.hour < 5) { if (startNameAddress.toLowerCase().contains('airport') ||
endNameAddress.toLowerCase().contains('airport') ||
startNameAddress.contains('مطار') ||
startNameAddress.contains('المطار') ||
endNameAddress.contains('مطار') ||
endNameAddress.contains('المطار')) {
costComfort =
(distance * comfortPrice) + (costDuration * latePrice) + 20;
costSpeed = (distance * speedPrice) + (costDuration * latePrice) + 20;
costBalash =
(distance * (speedPrice - 1)) + (costDuration * latePrice) + 20;
costDelivery =
(distance * deliveryPrice) + (costDuration * latePrice) + 20;
costLady =
(distance * comfortPrice + 2) + (costDuration * latePrice) + 20;
costRayehGai = (distance * 2 * speedPrice) -
((distance * 1 * speedPrice) * .4) +
costDuration * 2 * latePrice +
20;
update();
}
if (currentTime.hour >= 21 && currentTime.hour < 0) {
// costDistance = distance * latePrice; // costDistance = distance * latePrice;
costComfort = (distance * comfortPrice) + costDuration * latePrice; costComfort = (distance * comfortPrice) + costDuration * latePrice;
costSpeed = (distance * speedPrice) + costDuration * latePrice; costSpeed = (distance * speedPrice) + costDuration * latePrice;
@@ -3298,6 +3320,43 @@ class MapPassengerController extends GetxController {
((distance * 1 * speedPrice) * .4) + ((distance * 1 * speedPrice) * .4) +
costDuration * 2 * latePrice; costDuration * 2 * latePrice;
update();
} else if (currentTime.hour >= 1 && currentTime.hour < 5) {
// costDistance = distance * latePrice;
if (startNameAddress.contains('club') ||
startNameAddress.contains('nightclub') ||
startNameAddress.contains('ديسكو') ||
startNameAddress.contains('ملهى ليلي') ||
startNameAddress.contains('Night club')) {
// Your code here costComfort =
(distance * comfortPrice) + costDuration * (latePrice + .5) * 2;
costSpeed =
(distance * speedPrice) + costDuration * (latePrice + .5) * 2;
costBalash = (distance * (speedPrice - 1)) +
costDuration * (latePrice + .5) * 2;
costDelivery =
(distance * deliveryPrice) + costDuration * (latePrice + .5) * 2;
costLady = (distance * comfortPrice + 2) +
costDuration * (latePrice + .5) * 2;
costRayehGai = (distance * 2 * speedPrice) -
((distance * 1 * speedPrice) * .4) +
costDuration * 2 * (latePrice + .5) * 2;
update();
}
costComfort =
(distance * comfortPrice) + costDuration * (latePrice + .5);
costSpeed = (distance * speedPrice) + costDuration * (latePrice + .5);
costBalash =
(distance * (speedPrice - 1)) + costDuration * (latePrice + .5);
costDelivery =
(distance * deliveryPrice) + costDuration * (latePrice + .5);
costLady =
(distance * comfortPrice + 2) + costDuration * (latePrice + .5);
costRayehGai = (distance * 2 * speedPrice) -
((distance * 1 * speedPrice) * .4) +
costDuration * 2 * latePrice;
update(); update();
} else if (currentTime.hour >= 13 && currentTime.hour <= 16) { } else if (currentTime.hour >= 13 && currentTime.hour <= 16) {
// if (averageDuration > 2.5) { // if (averageDuration > 2.5) {

View File

@@ -112,23 +112,23 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
// ), // ),
// ), // ),
// ), // ),
AnimatedContainer( // AnimatedContainer(
duration: const Duration(microseconds: 200), // duration: const Duration(microseconds: 200),
width: controller.widthMapTypeAndTraffic, // width: controller.widthMapTypeAndTraffic,
decoration: BoxDecoration( // decoration: BoxDecoration(
color: AppColor.secondaryColor, // color: AppColor.secondaryColor,
border: Border.all(), // border: Border.all(),
borderRadius: BorderRadius.circular(15)), // borderRadius: BorderRadius.circular(15)),
child: IconButton( // child: IconButton(
onPressed: () async { // onPressed: () async {
Get.to(SmsSignupEgypt()); // Get.to(SmsSignupEgypt());
}, // },
icon: const Icon( // icon: const Icon(
Icons.chat, // Icons.chat,
size: 29, // size: 29,
), // ),
), // ),
), // ),
// AnimatedContainer( // AnimatedContainer(
// duration: const Duration(microseconds: 200), // duration: const Duration(microseconds: 200),
// width: controller.widthMapTypeAndTraffic, // width: controller.widthMapTypeAndTraffic,