copyWith method
TListState<T, K>
copyWith({
- LinkedHashSet<
K> ? selectedKeys, - LinkedHashSet<
K> ? expandedKeys, - List<
TListItem< ? displayItems,T, K> > - int? page,
- int? itemsPerPage,
- int? totalItems,
- bool? loading,
- bool? fetching,
- bool? hasMoreItems,
- String? search,
- TListError? error,
- K? expandedDetailKey,
- K? editingItemKey,
- bool? isCreatingItem,
- String? currentCursor,
- String? nextCursor,
- List<
String> ? cursorHistory, - Map<
String, dynamic> ? advancedSearch, - Map<
String, dynamic> ? additional,
Creates a copy of this state with the given fields updated.
Implementation
TListState<T, K> copyWith({
LinkedHashSet<K>? selectedKeys,
LinkedHashSet<K>? expandedKeys,
List<TListItem<T, K>>? displayItems,
int? page,
int? itemsPerPage,
int? totalItems,
bool? loading,
bool? fetching,
bool? hasMoreItems,
String? search,
TListError? error,
K? expandedDetailKey,
K? editingItemKey,
bool? isCreatingItem,
String? currentCursor,
String? nextCursor,
List<String>? cursorHistory,
Map<String, dynamic>? advancedSearch,
Map<String, dynamic>? additional,
}) {
return TListState<T, K>(
selectedKeys: selectedKeys ?? this.selectedKeys,
expandedKeys: expandedKeys ?? this.expandedKeys,
displayItems: displayItems ?? this.displayItems,
page: page ?? this.page,
itemsPerPage: itemsPerPage ?? this.itemsPerPage,
totalItems: totalItems ?? this.totalItems,
loading: loading ?? this.loading,
fetching: fetching ?? this.fetching,
hasMoreItems: hasMoreItems ?? this.hasMoreItems,
search: search ?? this.search,
error: error ?? this.error,
expandedDetailKey: expandedDetailKey ?? this.expandedDetailKey,
editingItemKey: editingItemKey ?? this.editingItemKey,
isCreatingItem: isCreatingItem ?? this.isCreatingItem,
currentCursor: currentCursor ?? this.currentCursor,
nextCursor: nextCursor ?? this.nextCursor,
cursorHistory: cursorHistory ?? this.cursorHistory,
advancedSearch: advancedSearch ?? this.advancedSearch,
additional: additional ?? this.additional,
);
}