addItem method

void addItem(
  1. ItemType newItem
)

Implementation

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