2/16/1
This commit is contained in:
@@ -133,8 +133,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
NotificationController().showNotification('Order', '', 'order');
|
||||
}
|
||||
var myListString = message.data['DriverList'];
|
||||
// print(myListString);
|
||||
// print('9999999999999myListString999999999999999');
|
||||
|
||||
var myList = jsonDecode(myListString) as List<dynamic>;
|
||||
driverToken = myList[14].toString();
|
||||
update();
|
||||
@@ -146,10 +145,10 @@ class FirebaseMessagesController extends GetxController {
|
||||
});
|
||||
} else if (message.notification!.title! == 'Apply Ride') {
|
||||
var passengerList = message.data['passengerList'];
|
||||
// print(passengerList);
|
||||
// print('9999999999999my Apply Ride 999999999999999');
|
||||
|
||||
var myList = jsonDecode(passengerList) as List<dynamic>;
|
||||
driverID = myList[2].toString();
|
||||
|
||||
NotificationController().showNotification(
|
||||
'Apply Order', 'Driver Applied the Ride for You'.tr, 'order');
|
||||
// driverAppliedTripSnakBar();
|
||||
@@ -162,11 +161,14 @@ class FirebaseMessagesController extends GetxController {
|
||||
'Cancel Trip'.tr, 'Passenger Cancel Trip'.tr, 'order');
|
||||
cancelTripDialog();
|
||||
} else if (message.notification!.title! == 'DriverIsGoingToPassenger') {
|
||||
Get.find<MapPassengerController>().isDriverInPassengerWay = true;
|
||||
Get.find<MapPassengerController>().update();
|
||||
NotificationController().showNotification('Driver is Going To You'.tr,
|
||||
'Please stay on the picked point.'.tr, 'order');
|
||||
// Get.snackbar('Driver is Going To Passenger', '',
|
||||
// backgroundColor: AppColor.greenColor);
|
||||
} else if (message.notification!.title! == 'RideIsBegin') {
|
||||
Get.find<MapPassengerController>().getBeginRideFromDriver();
|
||||
// Get.snackbar('RideIsBegin', '', backgroundColor: AppColor.greenColor);
|
||||
NotificationController()
|
||||
.showNotification('Trip is Begin'.tr, ''.tr, 'order');
|
||||
@@ -191,16 +193,11 @@ class FirebaseMessagesController extends GetxController {
|
||||
'you will pay to Driver'.tr +
|
||||
' ${Get.find<MapPassengerController>().totalPassenger} \$'.tr,
|
||||
'order');
|
||||
Get.find<MapPassengerController>().tripFinishedFromDriver();
|
||||
if (Get.find<PaymentController>().isCashChecked == false &&
|
||||
Get.find<PaymentController>().isWalletChecked == true) {
|
||||
driverFinishTripDialoge(driverList);
|
||||
} else if (double.parse(box.read(BoxName.passengerWalletTotal)) < 0) {
|
||||
CRUD().post(link: AppLink.addPassengersWallet, payload: {
|
||||
'passenger_id': box.read(BoxName.passengerID).toString(),
|
||||
'balance':
|
||||
((-1) * double.parse(box.read(BoxName.passengerWalletTotal)))
|
||||
.toString()
|
||||
});
|
||||
} else {
|
||||
Get.to(() => RateDriverFromPassenger(), arguments: {
|
||||
'driverId': driverList[0].toString(),
|
||||
'rideId': driverList[1].toString(),
|
||||
@@ -268,6 +265,9 @@ class FirebaseMessagesController extends GetxController {
|
||||
'Hi ,I will go now'.tr,
|
||||
'I will go now'.tr,
|
||||
Get.find<MapPassengerController>().driverToken, []);
|
||||
Get.find<MapPassengerController>()
|
||||
.startTimerDriverWaitPassenger5Minute();
|
||||
|
||||
Get.back();
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user