This commit is contained in:
Hamza-Ayed
2024-09-30 09:37:26 +03:00
parent f5b7307f86
commit 659f178737
21 changed files with 416 additions and 151 deletions

View File

@@ -135,7 +135,7 @@ class FirebaseMessagesController extends GetxController {
});
} else if (message.notification!.title == 'Cancel Trip') {
if (Platform.isAndroid) {
NotificationController().showNotification(
NotificationController1().showNotification(
'Cancel Trip'.tr, 'Passenger Cancel Trip'.tr, 'cancel', '');
}
cancelTripDialog();
@@ -143,7 +143,7 @@ class FirebaseMessagesController extends GetxController {
var myListString = message.data['DriverList'];
var driverList = jsonDecode(myListString) as List<dynamic>;
if (Platform.isAndroid) {
NotificationController()
NotificationController1()
.showNotification('VIP Order'.tr, '', 'order', '');
}
MyDialog().getDialog('VIP Order'.tr, 'midTitle', () {
@@ -159,13 +159,13 @@ class FirebaseMessagesController extends GetxController {
} else if (message.notification!.title == 'Cancel') {
cancelTripDialog1();
} else if (message.notification!.title! == 'token change') {
// NotificationController()
// .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) {
NotificationController()
NotificationController1()
.showNotification('message From passenger'.tr, ''.tr, 'tone2', '');
}
passengerDialog(message.notification!.body!);

View File

@@ -61,7 +61,7 @@ class NotificationController extends GetxController {
priority: Priority.high,
styleInformation: bigTextStyleInformation,
playSound: true,
sound: RawResourceAndroidNotificationSound(tone),
sound: RawResourceAndroidNotificationSound(tone == '' ? 'ding' : tone),
// audioAttributesUsage: AudioAttributesUsage.alarm,
visibility: NotificationVisibility.public,
autoCancel: false,