show method Null safety

  1. @override
Future<void> show(
  1. int id,
  2. String? title,
  3. String? body,
  4. {AndroidNotificationDetails? 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(
  int id,
  String? title,
  String? body, {
  AndroidNotificationDetails? notificationDetails,
  String? payload,
}) {
  validateId(id);
  return _channel.invokeMethod(
    'show',
    <String, Object?>{
      'id': id,
      'title': title,
      'body': body,
      'payload': payload ?? '',
      'platformSpecifics': notificationDetails?.toMap(),
    },
  );
}