copyWith method

AutoSuggestLoaded<T> copyWith({
  1. List<T>? items,
  2. String? query,
  3. bool? hasMoreResults,
  4. DateTime? fetchedAt,
  5. DateTime? dataExpiredAt,
  6. bool? isLoadingMore,
  7. Object? loadMoreError,
})

Create a copy with updated values

Implementation

AutoSuggestLoaded<T> copyWith({
  List<T>? items,
  String? query,
  bool? hasMoreResults,
  DateTime? fetchedAt,
  DateTime? dataExpiredAt,
  bool? isLoadingMore,
  Object? loadMoreError,
}) {
  return AutoSuggestLoaded<T>(
    items: items ?? this.items,
    query: query ?? this.query,
    hasMoreResults: hasMoreResults ?? this.hasMoreResults,
    fetchedAt: fetchedAt ?? this.fetchedAt,
    dataExpiredAt: dataExpiredAt ?? this.dataExpiredAt,
    isLoadingMore: isLoadingMore ?? this.isLoadingMore,
    loadMoreError: loadMoreError,
  );
}