copyWith method
InfiniteQueryState<T>
copyWith({
- QueryStatus? status,
- List<
T> ? data, - dynamic error,
- DateTime? dataUpdatedAt,
- DateTime? errorUpdatedAt,
- bool? isFetching,
- bool? isFetchingNextPage,
- 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,
);
}