show static method

Future<void> show({
  1. required String title,
  2. required String body,
  3. NotifyIcon? icon,
  4. NotifySound? sound,
  5. List<NotifyAction>? actions,
  6. String? payload,
})

Implementation

static Future<void> show({
  required String title,
  required String body,
  NotifyIcon? icon,
  NotifySound? sound,
  List<NotifyAction>? actions,
  String? payload,
}) async {
  final notificationSound = sound ?? _defaultSound;
  final notificationIcon = icon ?? _defaultIcon;

  final NotificationDetails details = _createDetails(
    notificationIcon,
    notificationSound,
    actions,
  );

  await _notificationsPlugin.show(
    _idCounter++,
    title,
    body,
    details,
    payload: payload,
  );
}