cancelNotification method

Future<void> cancelNotification(
  1. int hashCode
)

Cancel a scheduled notification for a given task id (using hashCode)

Implementation

Future<void> cancelNotification(int hashCode) async {
  try {
    await AwesomeNotifications().cancel(hashCode);
    debugPrint('Cancelled notification with id: $hashCode');
  } catch (e) {
    debugPrint('Error cancelling notification: $e');
  }
}