copyWith method

SearchProps copyWith({
  1. String? placeholder,
  2. String? value,
  3. void onChanged(
    1. String value
    )?,
  4. void onSubmitted(
    1. String value
    )?,
  5. bool? showClear,
  6. bool? showIcon,
  7. bool? loading,
  8. Widget? icon,
  9. bool? autofocus,
  10. bool? disabled,
  11. ComponentSize? size,
  12. SearchStyle? style,
  13. String? id,
  14. Map<String, String>? attributes,
  15. List<SearchResult>? results,
  16. String? resultsId,
  17. bool? showDropdown,
  18. String? dropdownMaxHeight,
  19. String? width,
})

Implementation

SearchProps copyWith({
  String? placeholder,
  String? value,
  void Function(String value)? onChanged,
  void Function(String value)? onSubmitted,
  bool? showClear,
  bool? showIcon,
  bool? loading,
  Widget? icon,
  bool? autofocus,
  bool? disabled,
  ComponentSize? size,
  SearchStyle? style,
  String? id,
  Map<String, String>? attributes,
  List<SearchResult>? results,
  String? resultsId,
  bool? showDropdown,
  String? dropdownMaxHeight,
  String? width,
}) {
  return SearchProps(
    placeholder: placeholder ?? this.placeholder,
    value: value ?? this.value,
    onChanged: onChanged ?? this.onChanged,
    onSubmitted: onSubmitted ?? this.onSubmitted,
    showClear: showClear ?? this.showClear,
    showIcon: showIcon ?? this.showIcon,
    loading: loading ?? this.loading,
    icon: icon ?? this.icon,
    autofocus: autofocus ?? this.autofocus,
    disabled: disabled ?? this.disabled,
    size: size ?? this.size,
    style: style ?? this.style,
    id: id ?? this.id,
    attributes: attributes ?? this.attributes,
    results: results ?? this.results,
    resultsId: resultsId ?? this.resultsId,
    showDropdown: showDropdown ?? this.showDropdown,
    dropdownMaxHeight: dropdownMaxHeight ?? this.dropdownMaxHeight,
    width: width ?? this.width,
  );
}