cancelAllNotifications method

Future<void> cancelAllNotifications()

Cancels all notifications.

Implementation

Future<void> cancelAllNotifications() async {
  if (!_initialized) {
    throw StateError('NotificationService not initialized. Call initialize() first.');
  }

  try {
    await _localNotifications!.cancelAll();
    logi('Cancelled all notifications');
  } catch (e, stackTrace) {
    loge(e, 'Error cancelling all notifications', stackTrace);
    _onError?.call('Error cancelling all notifications: $e', stackTrace);
  }
}