copyWith method
Creates a copy of this list state but with the given fields replaced with the new values.
Implementation
ListState<Record, Query> copyWith({
List<Record>? records = const DefaultList(),
ListStage? stage,
Query? query,
}) {
return ListState<Record, Query>(
records: records is DefaultList ? recordsStore : records,
stage: stage ?? this.stage,
query: query ?? this.query,
);
}