7/5/1
This commit is contained in:
@@ -117,8 +117,8 @@ class FirebaseMessagesController extends GetxController {
|
||||
}
|
||||
|
||||
void fireBaseTitles(RemoteMessage message) {
|
||||
if (message.notification!.title! == 'Order') {
|
||||
} else if (message.notification!.title! == 'Apply Ride') {
|
||||
if (message.notification!.title! == 'Order'.tr) {
|
||||
} else if (message.notification!.title! == 'Apply Ride'.tr) {
|
||||
var passengerList = message.data['passengerList'];
|
||||
|
||||
var myList = jsonDecode(passengerList) as List<dynamic>;
|
||||
@@ -130,7 +130,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
NotificationController().showNotification(
|
||||
'Apply Order'.tr, 'Driver Applied the Ride for You'.tr, 'order1');
|
||||
// driverAppliedTripSnakBar();
|
||||
} else if (message.notification!.title! == 'Promo') {
|
||||
} else if (message.notification!.title! == 'Promo'.tr) {
|
||||
NotificationController()
|
||||
.showNotification('Promo', 'Show latest promo'.tr, 'promo');
|
||||
Get.to(const PromosPassengerPage());
|
||||
@@ -143,11 +143,11 @@ class FirebaseMessagesController extends GetxController {
|
||||
'rideId': myList[0].toString(),
|
||||
'driverId': myList[1].toString(),
|
||||
});
|
||||
} else if (message.notification!.title! == 'token change') {
|
||||
} else if (message.notification!.title! == 'token change'.tr) {
|
||||
NotificationController()
|
||||
.showNotification('token change', 'token change', 'cancel');
|
||||
.showNotification('token change'.tr, 'token change'.tr, 'cancel');
|
||||
GoogleSignInHelper.signOut();
|
||||
} else if (message.notification!.title! == 'DriverIsGoingToPassenger') {
|
||||
} else if (message.notification!.title! == 'DriverIsGoingToPassenger'.tr) {
|
||||
Get.find<MapPassengerController>().isDriverInPassengerWay = true;
|
||||
Get.find<MapPassengerController>().update();
|
||||
NotificationController().showNotification('Driver is Going To You'.tr,
|
||||
@@ -160,32 +160,32 @@ class FirebaseMessagesController extends GetxController {
|
||||
passengerDialog(message.notification!.body!);
|
||||
|
||||
update();
|
||||
} else if (message.notification!.title! == 'message From Driver'.tr) {
|
||||
} else if (message.notification!.title! == 'message From Driver') {
|
||||
NotificationController()
|
||||
.showNotification('message From passenger'.tr, ''.tr, 'tone2');
|
||||
passengerDialog(message.notification!.body!);
|
||||
|
||||
update();
|
||||
} else if (message.notification!.title! == 'RideIsBegin') {
|
||||
} else if (message.notification!.title! == 'RideIsBegin'.tr) {
|
||||
Get.find<MapPassengerController>().getBeginRideFromDriver();
|
||||
// Get.snackbar('RideIsBegin', '', backgroundColor: AppColor.greenColor);
|
||||
box.write(BoxName.passengerWalletTotal, '0');
|
||||
NotificationController()
|
||||
.showNotification('Trip is Begin'.tr, ''.tr, 'start');
|
||||
update();
|
||||
} else if (message.notification!.title! == 'Hi ,I will go now') {
|
||||
} else if (message.notification!.title! == 'Hi ,I will go now'.tr) {
|
||||
// Get.snackbar('Hi ,I will go now', '',
|
||||
// backgroundColor: AppColor.greenColor);
|
||||
NotificationController().showNotification(
|
||||
'Passenger come to you'.tr, 'Hi ,I will go now'.tr, 'tone2');
|
||||
update();
|
||||
} else if (message.notification!.title! == 'Hi ,I Arrive your site') {
|
||||
} else if (message.notification!.title! == 'Hi ,I Arrive your site'.tr) {
|
||||
NotificationController()
|
||||
.showNotification('Hi ,I Arrive your site'.tr, ''.tr, 'tone2');
|
||||
driverArrivePassengerDialoge();
|
||||
|
||||
update();
|
||||
} else if (message.notification!.title! == 'Driver Finish Trip') {
|
||||
} else if (message.notification!.title! == 'Driver Finish Trip'.tr) {
|
||||
var myListString = message.data['passengerList'];
|
||||
var driverList = jsonDecode(myListString) as List<dynamic>;
|
||||
NotificationController().showNotification(
|
||||
@@ -204,7 +204,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
'price': driverList[3].toString()
|
||||
});
|
||||
// }
|
||||
} else if (message.notification!.title! == "Finish Monitor") {
|
||||
} else if (message.notification!.title! == "Finish Monitor".tr) {
|
||||
Get.defaultDialog(
|
||||
titleStyle: AppStyle.title,
|
||||
title: 'Trip finished '.tr,
|
||||
@@ -214,6 +214,8 @@ class FirebaseMessagesController extends GetxController {
|
||||
onPressed: () {
|
||||
Get.offAll(() => const MapPagePassenger());
|
||||
}));
|
||||
} else if (message.notification!.title! == "Trip Monitoring".tr) {
|
||||
Get.to(() => const TripMonitor());
|
||||
} else if (message.notification!.title! == 'Call Income') {
|
||||
try {
|
||||
var myListString = message.data['passengerList'];
|
||||
@@ -232,7 +234,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
remoteID: driverList[2].toString(),
|
||||
));
|
||||
} catch (e) {}
|
||||
} else if (message.notification!.title! == 'Call Income from Driver') {
|
||||
} else if (message.notification!.title! == 'Call Income from Driver'.tr) {
|
||||
try {
|
||||
var myListString = message.data['passengerList'];
|
||||
var driverList = jsonDecode(myListString) as List<dynamic>;
|
||||
@@ -250,7 +252,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
remoteID: driverList[2].toString(),
|
||||
));
|
||||
} catch (e) {}
|
||||
} else if (message.notification!.title! == 'Call End') {
|
||||
} else if (message.notification!.title! == 'Call End'.tr) {
|
||||
try {
|
||||
var myListString = message.data['passengerList'];
|
||||
var driverList = jsonDecode(myListString) as List<dynamic>;
|
||||
@@ -264,7 +266,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
// Assuming GetMaterialApp is initialized and context is valid for navigation
|
||||
// Get.off(const CallPage());
|
||||
} catch (e) {}
|
||||
} else if (message.notification!.title! == 'Driver Cancel Your Trip') {
|
||||
} else if (message.notification!.title! == 'Driver Cancel Your Trip'.tr) {
|
||||
// Get.snackbar(
|
||||
// 'You will be pay the cost to driver or we will get it from you on next trip'
|
||||
// .tr,
|
||||
@@ -294,7 +296,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
// );
|
||||
// }
|
||||
|
||||
else if (message.notification!.title! == 'Order Applied') {
|
||||
else if (message.notification!.title! == 'Order Applied'.tr) {
|
||||
NotificationController().showNotification(
|
||||
'The order Accepted by another Driver'.tr,
|
||||
'We regret to inform you that another driver has accepted this order.'
|
||||
|
||||
Reference in New Issue
Block a user