copyWith method

WebSearchConfig copyWith({
  1. int? maxUses,
  2. int? maxResults,
  3. List<String>? allowedDomains,
  4. List<String>? blockedDomains,
  5. WebSearchLocation? location,
  6. String? mode,
  7. String? fromDate,
  8. String? toDate,
  9. WebSearchType? searchType,
  10. WebSearchContextSize? contextSize,
  11. String? searchPrompt,
  12. WebSearchStrategy? strategy,
  13. bool? enabled,
})

Implementation

WebSearchConfig copyWith({
  int? maxUses,
  int? maxResults,
  List<String>? allowedDomains,
  List<String>? blockedDomains,
  WebSearchLocation? location,
  String? mode,
  String? fromDate,
  String? toDate,
  WebSearchType? searchType,
  WebSearchContextSize? contextSize,
  String? searchPrompt,
  WebSearchStrategy? strategy,
  bool? enabled,
}) =>
    WebSearchConfig(
      maxUses: maxUses ?? this.maxUses,
      maxResults: maxResults ?? this.maxResults,
      allowedDomains: allowedDomains ?? this.allowedDomains,
      blockedDomains: blockedDomains ?? this.blockedDomains,
      location: location ?? this.location,
      mode: mode ?? this.mode,
      fromDate: fromDate ?? this.fromDate,
      toDate: toDate ?? this.toDate,
      searchType: searchType ?? this.searchType,
      contextSize: contextSize ?? this.contextSize,
      searchPrompt: searchPrompt ?? this.searchPrompt,
      strategy: strategy ?? this.strategy,
      enabled: enabled ?? this.enabled,
    );