copyWith method

TextInputProps copyWith({
  1. String? placeholder,
  2. TextInputType? type,
  3. String? value,
  4. String? name,
  5. String? id,
  6. ComponentSize? size,
  7. TextInputVariant? variant,
  8. bool? disabled,
  9. bool? required,
  10. bool? readOnly,
  11. bool? fullWidth,
  12. String? label,
  13. String? helperText,
  14. String? error,
  15. Widget? prefix,
  16. Widget? suffix,
  17. void onChanged(
    1. String
    )?,
  18. void onFocus()?,
  19. void onBlur()?,
  20. void onSubmit(
    1. String
    )?,
})

Implementation

TextInputProps copyWith({
  String? placeholder,
  TextInputType? type,
  String? value,
  String? name,
  String? id,
  ComponentSize? size,
  TextInputVariant? variant,
  bool? disabled,
  bool? required,
  bool? readOnly,
  bool? fullWidth,
  String? label,
  String? helperText,
  String? error,
  Widget? prefix,
  Widget? suffix,
  void Function(String)? onChanged,
  void Function()? onFocus,
  void Function()? onBlur,
  void Function(String)? onSubmit,
}) {
  return TextInputProps(
    placeholder: placeholder ?? this.placeholder,
    type: type ?? this.type,
    value: value ?? this.value,
    name: name ?? this.name,
    id: id ?? this.id,
    size: size ?? this.size,
    variant: variant ?? this.variant,
    disabled: disabled ?? this.disabled,
    required: required ?? this.required,
    readOnly: readOnly ?? this.readOnly,
    fullWidth: fullWidth ?? this.fullWidth,
    label: label ?? this.label,
    helperText: helperText ?? this.helperText,
    error: error ?? this.error,
    prefix: prefix ?? this.prefix,
    suffix: suffix ?? this.suffix,
    onChanged: onChanged ?? this.onChanged,
    onFocus: onFocus ?? this.onFocus,
    onBlur: onBlur ?? this.onBlur,
    onSubmit: onSubmit ?? this.onSubmit,
  );
}