appendPage method

  1. @override
void appendPage(
  1. List<T> newItems,
  2. PageKeyType? nextPageKey
)
override

Append new items to the current list and set the next page key

Implementation

@override
void appendPage(List<T> newItems, PageKeyType? nextPageKey) {
  final updatedItems = <T>[...(state.itemList ?? []), ...newItems];
  state = state.copyWith(
    itemList: updatedItems,
    nextPageKey: nextPageKey,
    error: null,
  );
}