copyWith method
InfiniteQueryState<T>
copyWith({
- List<
T> ? data, - int? currentIndex,
- QueryStatus? status,
- bool? hasReachedMax,
- DateTime? timeCreated,
- T? lastPage,
- dynamic error,
override
Creates a copy of the current InfiniteQueryState with the given filed replaced.
Implementation
@override
InfiniteQueryState<T> copyWith({
List<T>? data,
int? currentIndex,
QueryStatus? status,
bool? hasReachedMax,
DateTime? timeCreated,
T? lastPage,
dynamic error,
}) {
return InfiniteQueryState(
lastPage: lastPage ?? this.lastPage,
hasReachedMax: hasReachedMax ?? this.hasReachedMax,
error: error ?? this.error,
data: data ?? this.data,
status: status ?? this.status,
timeCreated: timeCreated ?? this.timeCreated,
);
}