copyWith method
SmartPaginationLoaded<T>
copyWith(
{ - List<T>? items,
- List<T>? allItems,
- bool? hasReachedEnd,
- PaginationMeta? meta,
- DateTime? lastUpdate,
- bool? isLoadingMore,
- Exception? loadMoreError,
- DateTime? fetchedAt,
- DateTime? dataExpiredAt,
- String? activeOrderId,
})
Implementation
SmartPaginationLoaded<T> copyWith({
List<T>? items,
List<T>? allItems,
bool? hasReachedEnd,
PaginationMeta? meta,
DateTime? lastUpdate,
bool? isLoadingMore,
Exception? loadMoreError,
DateTime? fetchedAt,
DateTime? dataExpiredAt,
String? activeOrderId,
}) {
final updatedAllItems = allItems ?? this.allItems;
final updatedItems = items ?? this.items;
return SmartPaginationLoaded<T>(
items: updatedItems,
allItems: updatedAllItems,
hasReachedEnd: hasReachedEnd ?? this.hasReachedEnd,
meta: meta ?? this.meta,
lastUpdate: lastUpdate ?? this.lastUpdate,
isLoadingMore: isLoadingMore ?? this.isLoadingMore,
loadMoreError: loadMoreError ?? this.loadMoreError,
fetchedAt: fetchedAt ?? this.fetchedAt,
dataExpiredAt: dataExpiredAt ?? this.dataExpiredAt,
activeOrderId: activeOrderId ?? this.activeOrderId,
);
}