show method

  1. @override
Future<void> show({
  1. required int id,
  2. String? title,
  3. String? body,
  4. DarwinNotificationDetails? notificationDetails,
  5. String? payload,
})
override

Show a notification with an optional payload that will be passed back to the app when a notification is tapped on.

Implementation

@override
Future<void> show({
  required int id,
  String? title,
  String? body,
  DarwinNotificationDetails? notificationDetails,
  String? payload,
}) {
  validateId(id);
  return _channel.invokeMethod('show', <String, Object?>{
    'id': id,
    'title': title,
    'body': body,
    'payload': payload ?? '',
    'platformSpecifics': notificationDetails?.toMap(),
  });
}