copyWith method
SearchResult
copyWith({
- String? searchTerm,
- int? totalResults,
- List<
AyahWithSurah> ? results, - String? source,
Creates a copy of this SearchResult with the given fields replaced with new values
Implementation
SearchResult copyWith({
String? searchTerm,
int? totalResults,
List<AyahWithSurah>? results,
String? source,
}) {
return SearchResult(
searchTerm: searchTerm ?? this.searchTerm,
totalResults: totalResults ?? this.totalResults,
results: results ?? this.results,
source: source ?? this.source,
);
}