6/9/1
This commit is contained in:
@@ -19,6 +19,7 @@ import '../../views/home/map_page_passenger.dart';
|
||||
import '../../views/home/map_widget.dart/call_passenger_page.dart';
|
||||
import '../../views/home/profile/promos_passenger_page.dart';
|
||||
import '../auth/google_sign.dart';
|
||||
import '../functions/audio_record1.dart';
|
||||
import '../home/map_passenger_controller.dart';
|
||||
import 'local_notification.dart';
|
||||
|
||||
@@ -128,8 +129,8 @@ class FirebaseMessagesController extends GetxController {
|
||||
var passengerList = message.data['passengerList'];
|
||||
|
||||
var myList = jsonDecode(passengerList) as List<dynamic>;
|
||||
driverID = myList[2].toString();
|
||||
|
||||
driverID = myList[0].toString();
|
||||
Get.find<MapPassengerController>().driverToken = myList[2].toString();
|
||||
NotificationController().showNotification(
|
||||
'Apply Order'.tr, 'Driver Applied the Ride for You'.tr, 'order1');
|
||||
// driverAppliedTripSnakBar();
|
||||
@@ -180,6 +181,10 @@ class FirebaseMessagesController extends GetxController {
|
||||
'Driver Finish Trip'.tr,
|
||||
'you will pay to Driver'.tr + ' ${driverList[3].toString()} \$'.tr,
|
||||
'tone1');
|
||||
Get.find<AudioRecorderController>().stopRecording();
|
||||
if (double.parse(box.read(BoxName.passengerWalletTotal)) < 0) {
|
||||
box.write(BoxName.passengerWalletTotal, 0);
|
||||
}
|
||||
Get.find<MapPassengerController>().tripFinishedFromDriver();
|
||||
// if (Get.find<PaymentController>().isCashChecked == false &&
|
||||
// Get.find<PaymentController>().isWalletChecked == true) {
|
||||
@@ -263,16 +268,19 @@ class FirebaseMessagesController extends GetxController {
|
||||
|
||||
Get.find<MapPassengerController>().restCounter();
|
||||
Get.offAll(const MapPagePassenger());
|
||||
} else if (message.notification!.title! == 'Order Applied') {
|
||||
Get.snackbar(
|
||||
"The order has been accepted by another driver."
|
||||
.tr, // Corrected grammar
|
||||
"Be more mindful next time to avoid dropping orders."
|
||||
.tr, // Improved sentence structure
|
||||
backgroundColor: AppColor.yellowColor,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
);
|
||||
} else if (message.notification!.title! == 'Order Applied') {
|
||||
}
|
||||
// else if (message.notification!.title! == 'Order Applied') {
|
||||
// Get.snackbar(
|
||||
// "The order has been accepted by another driver."
|
||||
// .tr, // Corrected grammar
|
||||
// "Be more mindful next time to avoid dropping orders."
|
||||
// .tr, // Improved sentence structure
|
||||
// backgroundColor: AppColor.yellowColor,
|
||||
// snackPosition: SnackPosition.BOTTOM,
|
||||
// );
|
||||
// }
|
||||
|
||||
else if (message.notification!.title! == 'Order Applied') {
|
||||
NotificationController().showNotification(
|
||||
'The order Accepted by another Driver'.tr,
|
||||
'We regret to inform you that another driver has accepted this order.'
|
||||
@@ -321,6 +329,8 @@ class FirebaseMessagesController extends GetxController {
|
||||
.startTimerDriverWaitPassenger5Minute();
|
||||
|
||||
Get.back();
|
||||
Get.find<MapPassengerController>().remainingTime = 0;
|
||||
Get.find<MapPassengerController>().update();
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user