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

View File

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

View File

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