copyWith method

PaginationResponse<T> copyWith({
  1. List<T>? items,
  2. int? total,
  3. int? skip,
  4. int? limit,
  5. bool? isLastPage,
  6. dynamic nextPageKey,
})

Returns a copy of this pagination response with updated values

Implementation

PaginationResponse<T> copyWith({
  List<T>? items,
  int? total,
  int? skip,
  int? limit,
  bool? isLastPage,
  dynamic nextPageKey,
}) {
  return PaginationResponse<T>(
    items: items ?? this.items,
    total: total ?? this.total,
    skip: skip ?? this.skip,
    limit: limit ?? this.limit,
    isLastPage: isLastPage ?? this.isLastPage,
    nextPageKey: nextPageKey ?? this.nextPageKey,
  );
}