2/6/2
This commit is contained in:
@@ -939,12 +939,6 @@ class MapPassengerController extends GetxController {
|
|||||||
// clearPolylineAll();
|
// clearPolylineAll();
|
||||||
data = [];
|
data = [];
|
||||||
changeCancelRidePageShow();
|
changeCancelRidePageShow();
|
||||||
if (rideId != '') {
|
|
||||||
await CRUD().post(link: AppLink.updateDriverOrder, payload: {
|
|
||||||
"order_id": rideId.toString(), // Convert to String
|
|
||||||
"status": 'Cancel'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
rideConfirm = false;
|
rideConfirm = false;
|
||||||
shouldFetch = false;
|
shouldFetch = false;
|
||||||
@@ -957,17 +951,17 @@ class MapPassengerController extends GetxController {
|
|||||||
isMarkersShown = false;
|
isMarkersShown = false;
|
||||||
// totalStepDurations = 0;
|
// totalStepDurations = 0;
|
||||||
timeToPassengerFromDriverAfterApplied = 0;
|
timeToPassengerFromDriverAfterApplied = 0;
|
||||||
|
if (rideId != '') {
|
||||||
|
await CRUD().post(link: AppLink.updateDriverOrder, payload: {
|
||||||
|
"order_id": rideId.toString(), // Convert to String
|
||||||
|
"status": 'Cancel'
|
||||||
|
});
|
||||||
|
}
|
||||||
update();
|
update();
|
||||||
} else {
|
} else {
|
||||||
clearPlacesDestination();
|
clearPlacesDestination();
|
||||||
clearPolyline();
|
clearPolyline();
|
||||||
data = [];
|
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;
|
isPickerShown = false;
|
||||||
rideConfirm = false;
|
rideConfirm = false;
|
||||||
shouldFetch = false;
|
shouldFetch = false;
|
||||||
@@ -981,6 +975,12 @@ class MapPassengerController extends GetxController {
|
|||||||
changeCancelRidePageShow();
|
changeCancelRidePageShow();
|
||||||
clearPolyline();
|
clearPolyline();
|
||||||
remainingTime = 0;
|
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();
|
update();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,13 @@ GetBuilder<MapPassengerController> cancelRidePage() {
|
|||||||
MyElevatedButton(
|
MyElevatedButton(
|
||||||
title: 'Cancel Ride'.tr,
|
title: 'Cancel Ride'.tr,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
if (controller.selectedReason == -1) {
|
||||||
|
Get.snackbar('You Should be select reason.'.tr, '',
|
||||||
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
|
backgroundColor: AppColor.redColor);
|
||||||
|
} else {
|
||||||
controller.cancelRide();
|
controller.cancelRide();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||||
|
|
||||||
import '../../../constant/colors.dart';
|
import '../../../constant/colors.dart';
|
||||||
import '../../../controller/home/map_passenger_controller.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