copyWith method

PaginatedState<T, Q> copyWith({
  1. int? page,
  2. int? pageSize,
  3. PaginatedStateType? type,
  4. bool? hasNoMoreItems,
  5. List<T>? items,
  6. Object? error,
  7. StackTrace? stackTrace,
  8. Q? query,
})

Implementation

PaginatedState<T, Q> copyWith({
  int? page,
  int? pageSize,
  PaginatedStateType? type,
  bool? hasNoMoreItems,
  List<T>? items,
  Object? error,
  StackTrace? stackTrace,
  Q? query,
}) {
  return PaginatedState<T, Q>(
    page: page ?? this.page,
    pageSize: pageSize ?? this.pageSize,
    type: type ?? this.type,
    hasNoMoreItems: hasNoMoreItems ?? this.hasNoMoreItems,
    items: items ?? this.items,
    error: error ?? this.error,
    stackTrace: stackTrace ?? this.stackTrace,
    query: query ?? this.query,
  );
}