copyWith method

InfiniteQueryState<TData, TParams, TError> copyWith({
  1. List<TData>? data,
  2. TParams? parameters,
  3. int? currentPage,
  4. int? totalPages,
  5. int? totalItems,
  6. bool? hasNextPage,
  7. InfiniteQueryLoadingState? loadingState,
  8. TError? error,
})

Implementation

InfiniteQueryState<TData, TParams, TError> copyWith({
  List<TData>? data,
  TParams? parameters,
  int? currentPage,
  int? totalPages,
  int? totalItems,
  bool? hasNextPage,
  InfiniteQueryLoadingState? loadingState,
  TError? error,
}) {
  return InfiniteQueryState<TData, TParams, TError>(
    data: data ?? this.data,
    parameters: parameters ?? this.parameters,
    currentPage: currentPage ?? this.currentPage,
    totalPages: totalPages ?? this.totalPages,
    totalItems: totalItems ?? this.totalItems,
    hasNextPage: hasNextPage ?? this.hasNextPage,
    loadingState: loadingState ?? this.loadingState,
    error: error ?? this.error,
  );
}