From 1e37b6dceba1699d151790f8e85de775e7e870f5 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Fri, 10 May 2024 15:36:02 +0300 Subject: [PATCH] 5/10/2 --- .../home/map_passenger_controller.dart | 9 ++++---- lib/main.dart | 2 +- .../form_search_places_destenation.dart | 23 +++++++++++++++++-- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/lib/controller/home/map_passenger_controller.dart b/lib/controller/home/map_passenger_controller.dart index 37e12d2..e071574 100644 --- a/lib/controller/home/map_passenger_controller.dart +++ b/lib/controller/home/map_passenger_controller.dart @@ -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; diff --git a/lib/main.dart b/lib/main.dart index 4e49f10..d27ffbc 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -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, diff --git a/lib/views/home/map_widget.dart/form_search_places_destenation.dart b/lib/views/home/map_widget.dart/form_search_places_destenation.dart index d4d1606..adcf7f7 100644 --- a/lib/views/home/map_widget.dart/form_search_places_destenation.dart +++ b/lib/views/home/map_widget.dart/form_search_places_destenation.dart @@ -118,6 +118,19 @@ GetBuilder 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 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: () {