deleteItem method

void deleteItem(
  1. int index
)

Implementation

void deleteItem(int index) {
  _pagingState.maybeMap((value) {
    var items = [...value.items];
    items.removeWhere((element) => items.indexOf(element) == index);
    emit(PagingStateData(items, value.status, value.hasRequestNextPage));
  }, orElse: () => null);
}