This commit is contained in:
Hamza-Ayed
2024-05-10 15:36:02 +03:00
parent 4192c1e471
commit 1e37b6dceb
3 changed files with 27 additions and 7 deletions

View File

@@ -1424,7 +1424,7 @@ class MapPassengerController extends GetxController {
Future cancelRide() async {
//print("rideConfirm=$rideConfirm");
if (rideConfirm == false && statusRide != 'Apply') {
if (rideConfirm == false && statusRide == 'Apply') {
clearPlacesDestination();
clearPolyline();
// clearPolylineAll();
@@ -1436,6 +1436,8 @@ class MapPassengerController extends GetxController {
"order_id": rideId.toString(), // Convert to String
"status": 'Cancel'
});
FirebaseMessagesController().sendNotificationToDriverMAP(
'Cancel Trip', 'Trip Cancelled'.tr, driverToken, []);
}
rideConfirm = false;
shouldFetch = false;
@@ -1466,8 +1468,7 @@ class MapPassengerController extends GetxController {
"order_id": rideId.toString(), // Convert to String
"status": 'Cancel'
});
FirebaseMessagesController().sendNotificationToDriverMAP(
'Cancel Trip', 'Trip Cancelled'.tr, driverToken, []);
isPickerShown = false;
isWayPointStopsSheetUtilGetMap = false;
rideConfirm = false;
@@ -2306,7 +2307,7 @@ class MapPassengerController extends GetxController {
}
showBottomSheet1() async {
bottomSheet();
await bottomSheet();
isBottomSheetShown = true;
heightBottomSheetShown = 250;

View File

@@ -55,7 +55,7 @@ void main() async {
print(Get.deviceLocale!.countryCode);
Stripe.publishableKey = AK.publishableKey;
if (box.read(BoxName.driverID) != null) {}
// if (box.read(BoxName.driverID) != null) {}
if (Platform.isAndroid || Platform.isIOS) {
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,

View File

@@ -118,6 +118,19 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
'${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}',
'${latLng.latitude},${latLng.longitude}',
);
// controller.currentLocationToFormPlaces = false;
// controller.placesDestination = [];
// // controller.isCancelRidePageShown = true;
// controller.clearPlacesStart();
// controller.clearPlacesDestination();
// controller.passengerStartLocationFromMap =
// false;
// controller.isPickerShown = false;
// controller.bottomSheet();
// controller.showBottomSheet1();
// controller.update();
controller.currentLocationToFormPlaces = false;
controller.placesDestination = [];
// controller.isCancelRidePageShown = true;
@@ -129,8 +142,14 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
// controller.showBottomSheet1();
// Get.back();
controller.showBottomSheet1();
// controller.newMyLocation = latLng;
controller.update();
controller.placesDestination = [];
controller.placeDestinationController.clear();
controller.showBottomSheet1();
// Get.back();
// controller.showBottomSheet1();
controller.changeMainBottomMenuMap();
}
},
onLongPress: () {