2/6/2
This commit is contained in:
@@ -939,12 +939,6 @@ class MapPassengerController extends GetxController {
|
||||
// clearPolylineAll();
|
||||
data = [];
|
||||
changeCancelRidePageShow();
|
||||
if (rideId != '') {
|
||||
await CRUD().post(link: AppLink.updateDriverOrder, payload: {
|
||||
"order_id": rideId.toString(), // Convert to String
|
||||
"status": 'Cancel'
|
||||
});
|
||||
}
|
||||
|
||||
rideConfirm = false;
|
||||
shouldFetch = false;
|
||||
@@ -957,17 +951,17 @@ class MapPassengerController extends GetxController {
|
||||
isMarkersShown = false;
|
||||
// totalStepDurations = 0;
|
||||
timeToPassengerFromDriverAfterApplied = 0;
|
||||
if (rideId != '') {
|
||||
await CRUD().post(link: AppLink.updateDriverOrder, payload: {
|
||||
"order_id": rideId.toString(), // Convert to String
|
||||
"status": 'Cancel'
|
||||
});
|
||||
}
|
||||
update();
|
||||
} else {
|
||||
clearPlacesDestination();
|
||||
clearPolyline();
|
||||
data = [];
|
||||
await CRUD().post(link: AppLink.updateDriverOrder, payload: {
|
||||
"order_id": rideId.toString(), // Convert to String
|
||||
"status": 'Cancel'
|
||||
});
|
||||
FirebaseMessagesController().sendNotificationToDriverMAP(
|
||||
'Cancel Trip', 'Trip Cancelled'.tr, driverToken, []);
|
||||
isPickerShown = false;
|
||||
rideConfirm = false;
|
||||
shouldFetch = false;
|
||||
@@ -981,6 +975,12 @@ class MapPassengerController extends GetxController {
|
||||
changeCancelRidePageShow();
|
||||
clearPolyline();
|
||||
remainingTime = 0;
|
||||
await CRUD().post(link: AppLink.updateDriverOrder, payload: {
|
||||
"order_id": rideId.toString(), // Convert to String
|
||||
"status": 'Cancel'
|
||||
});
|
||||
FirebaseMessagesController().sendNotificationToDriverMAP(
|
||||
'Cancel Trip', 'Trip Cancelled'.tr, driverToken, []);
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -85,7 +85,13 @@ GetBuilder<MapPassengerController> cancelRidePage() {
|
||||
MyElevatedButton(
|
||||
title: 'Cancel Ride'.tr,
|
||||
onPressed: () {
|
||||
if (controller.selectedReason == -1) {
|
||||
Get.snackbar('You Should be select reason.'.tr, '',
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
backgroundColor: AppColor.redColor);
|
||||
} else {
|
||||
controller.cancelRide();
|
||||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../controller/home/map_passenger_controller.dart';
|
||||
@@ -50,6 +53,30 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
// if (Platform.isIOS)
|
||||
AnimatedContainer(
|
||||
duration: const Duration(microseconds: 200),
|
||||
width: controller.widthMapTypeAndTraffic,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.secondaryColor,
|
||||
border: Border.all(),
|
||||
borderRadius: BorderRadius.circular(15)),
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
controller.mapController?.animateCamera(
|
||||
CameraUpdate.newLatLng(LatLng(
|
||||
controller.passengerLocation.latitude,
|
||||
controller.passengerLocation.longitude)));
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.location_on,
|
||||
size: 29,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user