copyWith method
Copies the current state with the given values.
Implementation
PaginationState<T> copyWith({
List<T>? items,
int? currentPage,
int? lastPage,
bool? isLoading,
bool? loadingInitialPage,
bool? hasError,
int? total,
String? searchQuery,
}) {
return PaginationState<T>(
items: items ?? this.items,
currentPage: currentPage ?? this.currentPage,
lastPage: lastPage ?? this.lastPage,
isLoading: isLoading ?? this.isLoading,
loadingInitialPage: loadingInitialPage ?? this.loadingInitialPage,
hasError: hasError ?? this.hasError,
total: total ?? this.total,
searchQuery: searchQuery ?? this.searchQuery,
);
}