show method

Future show(
  1. int id,
  2. String title,
  3. String body, {
  4. String? imageUrl,
  5. Map<String, String>? data,
  6. NotificationSpecifics? notificationSpecifics,
})

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();
}