copyWith method

PagedState<T> copyWith({
  1. PagedStatus? status,
  2. List<FireData<T>>? items,
  3. String? message,
  4. RefreshStatus? refreshStatus,
  5. List<FireData<T>>? addedItems,
  6. List<FireData<T>>? updatedItems,
  7. int? updatedAt,
})

Implementation

PagedState<T> copyWith({
  PagedStatus? status,
  List<FireData<T>>? items,
  String? message,
  RefreshStatus? refreshStatus,
  List<FireData<T>>? addedItems,
  List<FireData<T>>? updatedItems,
  int? updatedAt,
}) {
  return PagedState(
    status: status ?? this.status,
    items: items ?? this.items,
    message: message,
    refreshStatus: refreshStatus ?? RefreshStatus.initial,
    addedItems: addedItems ?? newItems,
    updatedItems: updatedItems ?? this.updatedItems,
    updatedAt: updatedAt,
  );
}