copyWith method

PagingState<PageKeyType, T> copyWith({
  1. List<T>? itemList,
  2. dynamic error,
  3. PageKeyType? nextPageKey,
  4. bool? isRefreshing,
})

The copyWith method for creating a copy of PagingState with modified properties

Implementation

PagingState<PageKeyType, T> copyWith({
  List<T>? itemList,
  dynamic error,
  PageKeyType? nextPageKey,
  bool? isRefreshing,
}) {
  return PagingState<PageKeyType, T>(
    itemList: itemList,
    error: error,
    nextPageKey: nextPageKey,
    isRefreshing: isRefreshing,
  );
}