copyWith method

void copyWith(
  1. ItemType newItem,
  2. int index
)

Implementation

void copyWith(ItemType newItem, int index) {
  _pagingState.maybeMap((value) {
    var items = [...value.items];
    items[index] = newItem;
    emit(PagingStateData(items, value.status, value.hasRequestNextPage));
  }, orElse: () => null);
}