copyWith method

PaginationMeta copyWith({
  1. int? page,
  2. int? pageSize,
  3. String? nextCursor,
  4. String? previousCursor,
  5. bool? hasNext,
  6. bool? hasPrevious,
  7. int? totalCount,
  8. DateTime? fetchedAt,
})

Implementation

PaginationMeta copyWith({
  int? page,
  int? pageSize,
  String? nextCursor,
  String? previousCursor,
  bool? hasNext,
  bool? hasPrevious,
  int? totalCount,
  DateTime? fetchedAt,
}) {
  return PaginationMeta(
    page: page ?? this.page,
    pageSize: pageSize ?? this.pageSize,
    nextCursor: nextCursor ?? this.nextCursor,
    previousCursor: previousCursor ?? this.previousCursor,
    hasNext: hasNext ?? this.hasNext,
    hasPrevious: hasPrevious ?? this.hasPrevious,
    totalCount: totalCount ?? this.totalCount,
    fetchedAt: fetchedAt ?? this.fetchedAt,
  );
}