handleMessage method
void
handleMessage(
- RemoteMessage message
Implementation
void handleMessage(RemoteMessage message) {
if (message.data["data"] == null) {
print("Data is not defined: ${message.data}");
}
final notification = DataPayload.fromJson(jsonDecode(message.data["data"]));
if (_messagingAllowed && notification.details.message.isNotEmpty) {
didReceiveLocalNotificationStream.add(CustomNotification(
id: message.hashCode,
title: _appName,
body: notification.details.message,
payload: notification));
}
}