showNotification static method
dynamic
showNotification({
- required RemoteNotification notification,
- Map<
String, dynamic> ? payload, - String? icon,
Implementation
static showNotification(
{required RemoteNotification notification,
Map<String, dynamic>? payload,
String? icon}) {
flutterLocalNotificationsPlugin.show(
notification.hashCode,
notification.title,
notification.body,
NotificationDetails(
android: AndroidNotificationDetails(
channel.id,
channel.name,
// channel.description,
// TODO add a proper drawable resource to android, for now using
// one that already exists in example app.
icon: icon,
),
),
payload: jsonEncode(payload));
}