deleteNotification method

Future<void> deleteNotification(
  1. String id
)

Implementation

Future<void> deleteNotification(String id) async {
  try {
    await _service.deleteNotification(id);
    final updated = state.notifications.where((n) => n.id != id).toList();
    state = state.copyWith(notifications: updated);
  } catch (_) {}
}