copyWith method

  1. @override
PublicSearchResultState copyWith({
  1. List? records,
  2. dynamic error,
  3. dynamic nextPageKey,
  4. dynamic filter,
  5. List? previousPageKeys,
  6. bool? loading,
})

Implementation

@override
PublicSearchResultState copyWith({
  List<PublicSearchResultItem>? records,
  dynamic error,
  dynamic nextPageKey,
  PublicSearchFilters? filter,
  List<Next?>? previousPageKeys,
  bool? loading,
}) {
  final sup = super.copyWith(
    records: records,
    error: error,
    nextPageKey: nextPageKey,
    previousPageKeys: previousPageKeys,
  );
  return PublicSearchResultState(
    records: sup.records,
    error: sup.error,
    nextPageKey: sup.nextPageKey,
    previousPageKeys: sup.previousPageKeys,
    filter: filter ?? this.filter,
    loading: loading ?? this.loading,
  );
}