copyWith method
TextFieldConfiguration
copyWith({
- InputDecoration? decoration,
- TextStyle? style,
- TextEditingController? controller,
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onSubmitted, - bool? obscureText,
- MaxLengthEnforcement? maxLengthEnforcement,
- int? maxLength,
- int? maxLines,
- int? minLines,
- bool? autocorrect,
- List<
TextInputFormatter> ? inputFormatters, - bool? autofocus,
- TextInputType? keyboardType,
- bool? enabled,
- bool? enableSuggestions,
- TextAlign? textAlign,
- FocusNode? focusNode,
- Color? cursorColor,
- TextAlignVertical? textAlignVertical,
- Radius? cursorRadius,
- double? cursorWidth,
- MouseCursor? mouseCursor,
- Brightness? keyboardAppearance,
- VoidCallback? onEditingComplete,
- GestureTapCallback? onTap,
- EdgeInsets? scrollPadding,
- TextCapitalization? textCapitalization,
- TextDirection? textDirection,
- TextInputAction? textInputAction,
- bool? enableInteractiveSelection,
- List<
String> ? autofillHints,
Copies the TextFieldConfiguration and only changes the specified properties
Implementation
TextFieldConfiguration copyWith(
{InputDecoration? decoration,
TextStyle? style,
TextEditingController? controller,
ValueChanged<String>? onChanged,
ValueChanged<String>? onSubmitted,
bool? obscureText,
MaxLengthEnforcement? maxLengthEnforcement,
int? maxLength,
int? maxLines,
int? minLines,
bool? autocorrect,
List<TextInputFormatter>? inputFormatters,
bool? autofocus,
TextInputType? keyboardType,
bool? enabled,
bool? enableSuggestions,
TextAlign? textAlign,
FocusNode? focusNode,
Color? cursorColor,
TextAlignVertical? textAlignVertical,
Radius? cursorRadius,
double? cursorWidth,
MouseCursor? mouseCursor,
Brightness? keyboardAppearance,
VoidCallback? onEditingComplete,
GestureTapCallback? onTap,
EdgeInsets? scrollPadding,
TextCapitalization? textCapitalization,
TextDirection? textDirection,
TextInputAction? textInputAction,
bool? enableInteractiveSelection,
List<String>? autofillHints}) {
return TextFieldConfiguration(
decoration: decoration ?? this.decoration,
style: style ?? this.style,
controller: controller ?? this.controller,
onChanged: onChanged ?? this.onChanged,
onSubmitted: onSubmitted ?? this.onSubmitted,
obscureText: obscureText ?? this.obscureText,
maxLengthEnforcement: maxLengthEnforcement ?? this.maxLengthEnforcement,
maxLength: maxLength ?? this.maxLength,
maxLines: maxLines ?? this.maxLines,
minLines: minLines ?? this.minLines,
autocorrect: autocorrect ?? this.autocorrect,
inputFormatters: inputFormatters ?? this.inputFormatters,
autofocus: autofocus ?? this.autofocus,
keyboardType: keyboardType ?? this.keyboardType,
enabled: enabled ?? this.enabled,
enableSuggestions: enableSuggestions ?? this.enableSuggestions,
textAlign: textAlign ?? this.textAlign,
textAlignVertical: textAlignVertical ?? this.textAlignVertical,
focusNode: focusNode ?? this.focusNode,
cursorColor: cursorColor ?? this.cursorColor,
cursorRadius: cursorRadius ?? this.cursorRadius,
cursorWidth: cursorWidth ?? this.cursorWidth,
mouseCursor: mouseCursor ?? this.mouseCursor,
keyboardAppearance: keyboardAppearance ?? this.keyboardAppearance,
onEditingComplete: onEditingComplete ?? this.onEditingComplete,
onTap: onTap ?? this.onTap,
scrollPadding: scrollPadding ?? this.scrollPadding,
textCapitalization: textCapitalization ?? this.textCapitalization,
textInputAction: textInputAction ?? this.textInputAction,
textDirection: textDirection ?? this.textDirection,
enableInteractiveSelection:
enableInteractiveSelection ?? this.enableInteractiveSelection,
autofillHints: autofillHints ?? this.autofillHints,
);
}