show static method
Future<void>
show({
- required String title,
- required String body,
- NotifyIcon? icon,
- NotifySound? sound,
- List<
NotifyAction> ? actions, - String? payload,
- int? id,
Implementation
static Future<void> show({
required String title,
required String body,
NotifyIcon? icon,
NotifySound? sound,
List<NotifyAction>? actions,
String? payload,
int? id,
}) async {
final notificationId = id ?? _idCounter++;
await _channel.invokeMethod('show', {
'id': notificationId,
'title': title,
'body': body,
'icon': icon?.name,
'sound': sound?.name,
'actions': actions?.map((e) => {'id': e.id, 'label': e.label}).toList(),
});
}