cancel method

  1. @override
Future<bool> cancel(
  1. String notificationId
)
override

Cancel a pending notification.

Implementation

@override
Future<bool> cancel(String notificationId) async {
  final index = sentNotifications.indexWhere(
    (n) => n.notificationId == notificationId,
  );
  if (index >= 0) {
    sentNotifications.removeAt(index);
    return true;
  }
  return false;
}