2-10/2/1
This commit is contained in:
@@ -83,7 +83,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
FirebaseMessaging.onBackgroundMessage((RemoteMessage message) async {
|
||||
// if (message.notification!.title! == 'Order'.tr) {
|
||||
// if (Platform.isAndroid) {
|
||||
// NotificationController()
|
||||
// NotificationController1()
|
||||
// .showNotification('Order'.tr, '', 'order', 'order_page_payload');
|
||||
// }
|
||||
// // await FirebaseMessagesController().showOverlayNotification(message);
|
||||
@@ -115,7 +115,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
Future<void> fireBaseTitles(RemoteMessage message) async {
|
||||
if (message.notification!.title! == 'Order'.tr) {
|
||||
if (Platform.isAndroid) {
|
||||
NotificationController().showNotification('Order'.tr, '', 'order', '');
|
||||
NotificationController1().showNotification('Order'.tr, '', 'order', '');
|
||||
}
|
||||
// await FirebaseMessagesController().showOverlayNotification(message);
|
||||
var myListString = message.data['DriverList'];
|
||||
@@ -159,21 +159,22 @@ class FirebaseMessagesController extends GetxController {
|
||||
} else if (message.notification!.title == 'Cancel') {
|
||||
cancelTripDialog1();
|
||||
} else if (message.notification!.title! == 'token change') {
|
||||
NotificationController1()
|
||||
.showNotification('token change'.tr, 'token change', 'cancel', '');
|
||||
// NotificationController1()
|
||||
// .showNotification('token change'.tr, 'token change', 'cancel');
|
||||
// GoogleSignInHelper.signOut();
|
||||
GoogleSignInHelper.signOut();
|
||||
} else if (message.notification!.title! == 'message From passenger') {
|
||||
if (Platform.isAndroid) {
|
||||
NotificationController1()
|
||||
.showNotification('message From passenger'.tr, ''.tr, 'tone2', '');
|
||||
}
|
||||
// print('sdfd');
|
||||
// if (Platform.isAndroid) {
|
||||
// NotificationController1()
|
||||
// .showNotification('message From passenger'.tr, ''.tr, 'tone2', '');
|
||||
// }
|
||||
passengerDialog(message.notification!.body!);
|
||||
|
||||
update();
|
||||
} else if (message.notification!.title! == 'face detect') {
|
||||
if (Platform.isAndroid) {
|
||||
NotificationController()
|
||||
NotificationController1()
|
||||
.showNotification('face detect'.tr, ''.tr, 'tone2', '');
|
||||
}
|
||||
String result0 = await faceDetector();
|
||||
@@ -203,7 +204,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
// Get.snackbar('Hi ,I will go now', '',
|
||||
// backgroundColor: AppColor.greenColor);
|
||||
if (Platform.isAndroid) {
|
||||
NotificationController().showNotification(
|
||||
NotificationController1().showNotification(
|
||||
'Passenger come to you'.tr, 'Hi ,I will go now'.tr, 'tone2', '');
|
||||
}
|
||||
update();
|
||||
@@ -213,7 +214,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
var driverList = jsonDecode(myListString) as List<dynamic>;
|
||||
// if (Platform.isAndroid) {
|
||||
if (Platform.isAndroid) {
|
||||
NotificationController().showNotification('Call Income'.tr,
|
||||
NotificationController1().showNotification('Call Income'.tr,
|
||||
message.notification!.body!, 'iphone_ringtone', '');
|
||||
}
|
||||
// }
|
||||
@@ -231,7 +232,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
var driverList = jsonDecode(myListString) as List<dynamic>;
|
||||
// if (Platform.isAndroid) {
|
||||
if (Platform.isAndroid) {
|
||||
NotificationController().showNotification('Call Income'.tr,
|
||||
NotificationController1().showNotification('Call Income'.tr,
|
||||
message.notification!.body!, 'iphone_ringtone', '');
|
||||
}
|
||||
// }
|
||||
@@ -245,7 +246,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
} else if (message.notification!.title! ==
|
||||
"Criminal Document Required".tr) {
|
||||
if (Platform.isAndroid) {
|
||||
NotificationController().showNotification(
|
||||
NotificationController1().showNotification(
|
||||
"Criminal Document Required".tr,
|
||||
message.notification!.body!,
|
||||
'tone2',
|
||||
@@ -262,7 +263,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
var myListString = message.data['passengerList'];
|
||||
var driverList = jsonDecode(myListString) as List<dynamic>;
|
||||
if (Platform.isAndroid) {
|
||||
NotificationController().showNotification(
|
||||
NotificationController1().showNotification(
|
||||
'Call End'.tr, message.notification!.body!, 'tone2', '');
|
||||
}
|
||||
// Assuming GetMaterialApp is initialized and context is valid for navigation
|
||||
@@ -293,7 +294,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
});
|
||||
} else if (message.notification!.title! == 'Order Applied'.tr) {
|
||||
if (Platform.isAndroid) {
|
||||
NotificationController().showNotification(
|
||||
NotificationController1().showNotification(
|
||||
'The order Accepted by another Driver'.tr,
|
||||
'We regret to inform you that another driver has accepted this order.'
|
||||
.tr,
|
||||
|
||||
Reference in New Issue
Block a user