copyWith method

  1. @override
InfiniteQueryState<T> copyWith({
  1. QueryStatus? status,
  2. List<T>? data,
  3. dynamic error,
  4. DateTime? dataUpdatedAt,
  5. DateTime? errorUpdatedAt,
  6. bool? isFetching,
  7. bool? isFetchingNextPage,
  8. bool? hasNextPage,
})
override

Creates a copy of the query state with the given fields replaced with the new values.

Implementation

@override
InfiniteQueryState<T> copyWith({
  QueryStatus? status,
  List<T>? data,
  dynamic error,
  DateTime? dataUpdatedAt,
  DateTime? errorUpdatedAt,
  bool? isFetching,
  bool? isFetchingNextPage,
  bool? hasNextPage,
}) {
  return InfiniteQueryState<T>(
    status: status ?? this.status,
    data: data ?? this.data,
    error: error ?? this.error,
    dataUpdatedAt: dataUpdatedAt ?? this.dataUpdatedAt,
    errorUpdatedAt: errorUpdatedAt ?? this.errorUpdatedAt,
    isFetching: isFetching ?? this.isFetching,
    isFetchingNextPage: isFetchingNextPage ?? this.isFetchingNextPage,
    hasNextPage: hasNextPage ?? this.hasNextPage,
  );
}