show method
Show notification.
id
- notification identifier.
title
- title.
body
- the main text of the notification.
data
- data for notification.
notificationSpecifics
- notification specifics.
Implementation
Future show(
int id,
String title,
String body, {
String? imageUrl,
Map<String, String>? data,
NotificationSpecifics? notificationSpecifics,
}) {
if (platform.isAndroid) {
return androidNotification!.show(
id,
title,
body,
imageUrl,
data,
notificationSpecifics?.androidNotificationSpecifics,
);
} else if (platform.isIOS) {
return iosNotification!.show(
id,
title,
body,
imageUrl,
data,
notificationSpecifics?.iosNotificationSpecifics,
);
}
return Future<void>.value();
}