dismiss method

  1. @override
Future<void> dismiss(
  1. int id
)
override

Dismisses a single notification without canceling its respective schedule.

The id parameter is an int that represents the unique identifier of the notification to dismiss. This method dismisses the notification only, leaving its associated schedule intact.

If the notification is currently shown, it will be dismissed immediately. If the notification is not currently shown, this method has no effect.

This method returns a Future that resolves to void.

Implementation

@override
Future<void> dismiss(int id) async {
  validateId(id);
  await methodChannel.invokeMethod(CHANNEL_METHOD_DISMISS_NOTIFICATION, id);
}