copyWith method
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 onChanged()?,
- void onFocus()?,
- void onBlur()?,
- void onSubmit()?,
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,
);
}