fetchPaginatedList method

void fetchPaginatedList()

Implementation

void fetchPaginatedList() {
  if (state is PaginationInitial) {
    _fetchAndEmitPaginatedList(previousList: preloadedItems);
  } else if (state is PaginationLoaded<T>) {
    final loadedState = state as PaginationLoaded;
    if (loadedState.hasReachedEnd) return;
    _fetchAndEmitPaginatedList(previousList: loadedState.items as List<T>);
  }
}