You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Firebase Cloud-Messaging to send push notifications to my App.
FCM does not call main() instead it calls a global method. Inside this global method I am initializing easy_localization and firebase. This method will then show a notification where I try to translate received body text.
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
await Firebase.initializeApp();
await NotificationManager.instance.init();
await EasyLocalization.ensureInitialized();
....
var body = LocaleKeys.chat_message_notification_body_image.tr()
}
body will be chat_message_notification_body_image and throws error message that the key couldn't be found.
Does anyone know to get translation to work here?
The text was updated successfully, but these errors were encountered:
I'm using Firebase Cloud-Messaging to send push notifications to my App.
FCM does not call
main()
instead it calls a global method. Inside this global method I am initializing easy_localization and firebase. This method will then show a notification where I try to translate received body text.body will be
chat_message_notification_body_image
and throws error message that the key couldn't be found.Does anyone know to get translation to work here?
The text was updated successfully, but these errors were encountered: