cancelScheduledNotification method

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

Cancel a scheduled notification

Implementation

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