removeLocally method

void removeLocally(
  1. T item
)

Implementation

void removeLocally(T item) {
  final data = state.data ?? [];
  final index = data.indexOf(item);

  if (index != -1) {
    final updatedList = [...data];
    updatedList.removeAt(index);
    _emitUpdatedData(updatedList);
  }
}