Код: Выделить всё
var payload = {
notification: {
title: notificationTitle,
body: notificationMessage,
click_action:"/screena",sound:"default",
}
};
https://github.com/flutter/plugins/tree ... _messaging
и мой код службы push-сообщений Firebase выглядит так
Код: Выделить всё
pushMessagingService() async{
messagingreference.configure(
onMessage: (Map message) {
print("I am here in on message");
print(message);
},
onLaunch: (Map message) {
print("I am here onLaunch");
print(message);
},
onResume: (Map message) {
print("I am hereonResume");
print(message);
},
);
messagingreference.requestNotificationPermissions(
const IosNotificationSettings(sound: true, badge: true, alert: true));
messagingreference.onIosSettingsRegistered
.listen((IosNotificationSettings settings) {
print("Settings registered: $settings");
});
messagingreference.getToken().then((String token) async {
print(token);
});
}
Подробнее здесь: https://stackoverflow.com/questions/484 ... or-flutter