cancelNotification method

  1. @override
Future<bool> cancelNotification(
  1. String id
)
override

Cancel a specific notification

Implementation

@override
Future<bool> cancelNotification(String id) async {
  try {
    final result = await methodChannel.invokeMethod<bool>('cancelNotification', {'id': id});
    return result ?? false;
  } on PlatformException catch (e) {
    debugPrint('Error canceling notification: ${e.message}');
    return false;
  }
}