cloudMessage property
CloudMessage
cloudMessage
Implementation
CloudMessage get cloudMessage {
final notification = this.notification!;
String? imageUrl;
if (!kIsWeb && Platform.isAndroid) {
imageUrl = notification.android?.imageUrl;
} else if (!kIsWeb && (Platform.isIOS || Platform.isMacOS)) {
imageUrl = notification.apple?.imageUrl;
}
return CloudMessage(
title: notification.title ?? '',
dateTime: sentTime ?? DateTime.now(),
content: notification.body ?? '',
url: data['url'],
imageUrl: imageUrl,
data: data,
);
}