2026-02-28-1
This commit is contained in:
@@ -82,13 +82,13 @@ class FirebaseMessagesController extends GetxController {
|
||||
RemoteNotification? notification = message.notification;
|
||||
AndroidNotification? android = notification?.android;
|
||||
// if (notification != null && android != null) {
|
||||
if (message.data.isNotEmpty && message.notification != null) {
|
||||
if (message.data.isNotEmpty) {
|
||||
fireBaseTitles(message);
|
||||
}
|
||||
});
|
||||
FirebaseMessaging.onBackgroundMessage((RemoteMessage message) async {
|
||||
// Handle background message
|
||||
if (message.data.isNotEmpty && message.notification != null) {
|
||||
if (message.data.isNotEmpty) {
|
||||
fireBaseTitles(message);
|
||||
}
|
||||
});
|
||||
@@ -109,8 +109,8 @@ class FirebaseMessagesController extends GetxController {
|
||||
? Get.find<MapPassengerController>()
|
||||
: null;
|
||||
// اقرأ العنوان (للعرض)
|
||||
String title = message.notification?.title ?? '';
|
||||
String body = message.notification?.body ?? '';
|
||||
String title = message.data['title'] ?? message.notification?.title ?? '';
|
||||
String body = message.data['body'] ?? message.notification?.body ?? '';
|
||||
|
||||
if (category == 'ORDER') {
|
||||
// <-- مثال: كان 'Order'.tr
|
||||
|
||||
Reference in New Issue
Block a user