cancel method Null safety

  1. @override
Future<void> cancel(
  1. int id,
  2. {String? tag}

Cancel/remove the notification with the specified id.

This applies to notifications that have been scheduled and those that have already been presented.

The tag parameter specifies the Android tag. If it is provided, then the notification that matches both the id and the tag will be canceled. tag has no effect on other platforms.


Future<void> cancel(int id, {String? tag}) async {

  return _channel.invokeMethod('cancel', <String, Object?>{
    'id': id,
    'tag': tag,