copyWith method
TextField
copyWith({
- Key? key,
- TextEditingController? controller,
- String? initialValue,
- FocusNode? focusNode,
- UndoHistoryController? undoController,
- BoxDecoration? decoration,
- EdgeInsetsGeometry? padding,
- Widget? placeholder,
- Widget? leading,
- Widget? trailing,
- CrossAxisAlignment? crossAxisAlignment,
- String? clearButtonSemanticLabel,
- TextInputType? keyboardType,
- TextInputAction? textInputAction,
- TextCapitalization? textCapitalization,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextAlign? textAlign,
- TextAlignVertical? textAlignVertical,
- TextDirection? textDirection,
- bool? readOnly,
- bool? showCursor,
- bool? autofocus,
- String? obscuringCharacter,
- bool? obscureText,
- bool? autocorrect,
- SmartDashesType? smartDashesType,
- SmartQuotesType? smartQuotesType,
- bool? enableSuggestions,
- int? maxLines,
- int? minLines,
- bool? expands,
- int? maxLength,
- MaxLengthEnforcement? maxLengthEnforcement,
- ValueChanged<
String> ? onChanged, - VoidCallback? onEditingComplete,
- ValueChanged<
String> ? onSubmitted, - TapRegionCallback? onTapOutside,
- TapRegionCallback? onTapUpOutside,
- List<
TextInputFormatter> ? inputFormatters, - bool? enabled,
- double? cursorWidth,
- double? cursorHeight,
- Radius? cursorRadius,
- bool? cursorOpacityAnimates,
- Color? cursorColor,
- BoxHeightStyle? selectionHeightStyle,
- BoxWidthStyle? selectionWidthStyle,
- Brightness? keyboardAppearance,
- EdgeInsets? scrollPadding,
- bool? enableInteractiveSelection,
- TextSelectionControls? selectionControls,
- GestureTapCallback? onTap,
- ScrollController? scrollController,
- ScrollPhysics? scrollPhysics,
- Iterable<
String> ? autofillHints, - Clip? clipBehavior,
- String? restorationId,
- bool? stylusHandwritingEnabled,
- bool? enableIMEPersonalizedLearning,
- ContentInsertionConfiguration? contentInsertionConfiguration,
- EditableTextContextMenuBuilder? contextMenuBuilder,
- String? hintText,
- bool? border,
- BorderRadiusGeometry? borderRadius,
- bool? filled,
- WidgetStatesController? statesController,
- TextMagnifierConfiguration? magnifierConfiguration,
- SpellCheckConfiguration? spellCheckConfiguration,
- List<
InputFeature> ? features, - List<
TextInputFormatter> ? submitFormatters,
Implementation
TextField copyWith({
Key? key,
TextEditingController? controller,
String? initialValue,
FocusNode? focusNode,
UndoHistoryController? undoController,
BoxDecoration? decoration,
EdgeInsetsGeometry? padding,
Widget? placeholder,
Widget? leading,
Widget? trailing,
CrossAxisAlignment? crossAxisAlignment,
String? clearButtonSemanticLabel,
TextInputType? keyboardType,
TextInputAction? textInputAction,
TextCapitalization? textCapitalization,
TextStyle? style,
StrutStyle? strutStyle,
TextAlign? textAlign,
TextAlignVertical? textAlignVertical,
TextDirection? textDirection,
bool? readOnly,
bool? showCursor,
bool? autofocus,
String? obscuringCharacter,
bool? obscureText,
bool? autocorrect,
SmartDashesType? smartDashesType,
SmartQuotesType? smartQuotesType,
bool? enableSuggestions,
int? maxLines,
int? minLines,
bool? expands,
int? maxLength,
MaxLengthEnforcement? maxLengthEnforcement,
ValueChanged<String>? onChanged,
VoidCallback? onEditingComplete,
ValueChanged<String>? onSubmitted,
TapRegionCallback? onTapOutside,
TapRegionCallback? onTapUpOutside,
List<TextInputFormatter>? inputFormatters,
bool? enabled,
double? cursorWidth,
double? cursorHeight,
Radius? cursorRadius,
bool? cursorOpacityAnimates,
Color? cursorColor,
ui.BoxHeightStyle? selectionHeightStyle,
ui.BoxWidthStyle? selectionWidthStyle,
Brightness? keyboardAppearance,
EdgeInsets? scrollPadding,
bool? enableInteractiveSelection,
TextSelectionControls? selectionControls,
GestureTapCallback? onTap,
ScrollController? scrollController,
ScrollPhysics? scrollPhysics,
Iterable<String>? autofillHints,
Clip? clipBehavior,
String? restorationId,
bool? stylusHandwritingEnabled,
bool? enableIMEPersonalizedLearning,
ContentInsertionConfiguration? contentInsertionConfiguration,
EditableTextContextMenuBuilder? contextMenuBuilder,
String? hintText,
bool? border,
BorderRadiusGeometry? borderRadius,
bool? filled,
WidgetStatesController? statesController,
TextMagnifierConfiguration? magnifierConfiguration,
SpellCheckConfiguration? spellCheckConfiguration,
List<InputFeature>? features,
List<TextInputFormatter>? submitFormatters,
}) {
return TextField(
key: key ?? this.key,
controller: controller ?? this.controller,
initialValue: initialValue ?? this.initialValue,
focusNode: focusNode ?? this.focusNode,
undoController: undoController ?? this.undoController,
decoration: decoration ?? this.decoration,
padding: padding ?? this.padding,
placeholder: placeholder ?? this.placeholder,
leading: leading ?? this.leading,
trailing: trailing ?? this.trailing,
crossAxisAlignment: crossAxisAlignment ?? this.crossAxisAlignment,
clearButtonSemanticLabel:
clearButtonSemanticLabel ?? this.clearButtonSemanticLabel,
keyboardType: keyboardType ?? this.keyboardType,
textInputAction: textInputAction ?? this.textInputAction,
textCapitalization: textCapitalization ?? this.textCapitalization,
style: style ?? this.style,
strutStyle: strutStyle ?? this.strutStyle,
textAlign: textAlign ?? this.textAlign,
textAlignVertical: textAlignVertical ?? this.textAlignVertical,
textDirection: textDirection ?? this.textDirection,
readOnly: readOnly ?? this.readOnly,
showCursor: showCursor ?? this.showCursor,
autofocus: autofocus ?? this.autofocus,
obscuringCharacter: obscuringCharacter ?? this.obscuringCharacter,
obscureText: obscureText ?? this.obscureText,
autocorrect: autocorrect ?? this.autocorrect,
smartDashesType: smartDashesType ?? this.smartDashesType,
smartQuotesType: smartQuotesType ?? this.smartQuotesType,
enableSuggestions: enableSuggestions ?? this.enableSuggestions,
maxLines: maxLines ?? this.maxLines,
minLines: minLines ?? this.minLines,
expands: expands ?? this.expands,
maxLength: maxLength ?? this.maxLength,
maxLengthEnforcement: maxLengthEnforcement ?? this.maxLengthEnforcement,
onChanged: onChanged ?? this.onChanged,
onEditingComplete: onEditingComplete ?? this.onEditingComplete,
onSubmitted: onSubmitted ?? this.onSubmitted,
onTapOutside: onTapOutside ?? this.onTapOutside,
onTapUpOutside: onTapUpOutside ?? this.onTapUpOutside,
inputFormatters: inputFormatters ?? this.inputFormatters,
enabled: enabled ?? this.enabled,
cursorWidth: cursorWidth ?? this.cursorWidth,
cursorHeight: cursorHeight ?? this.cursorHeight,
cursorRadius: cursorRadius ?? this.cursorRadius,
cursorOpacityAnimates:
cursorOpacityAnimates ?? this.cursorOpacityAnimates,
cursorColor: cursorColor ?? this.cursorColor,
selectionHeightStyle: selectionHeightStyle ?? this.selectionHeightStyle,
selectionWidthStyle: selectionWidthStyle ?? this.selectionWidthStyle,
keyboardAppearance: keyboardAppearance ?? this.keyboardAppearance,
scrollPadding: scrollPadding ?? this.scrollPadding,
enableInteractiveSelection:
enableInteractiveSelection ?? this.enableInteractiveSelection,
selectionControls: selectionControls ?? this.selectionControls,
onTap: onTap ?? this.onTap,
scrollController: scrollController ?? this.scrollController,
scrollPhysics: scrollPhysics ?? this.scrollPhysics,
autofillHints: autofillHints ?? this.autofillHints,
clipBehavior: clipBehavior ?? this.clipBehavior,
restorationId: restorationId ?? this.restorationId,
stylusHandwritingEnabled:
stylusHandwritingEnabled ?? this.stylusHandwritingEnabled,
enableIMEPersonalizedLearning:
enableIMEPersonalizedLearning ?? this.enableIMEPersonalizedLearning,
contentInsertionConfiguration:
contentInsertionConfiguration ?? this.contentInsertionConfiguration,
contextMenuBuilder: contextMenuBuilder ?? this.contextMenuBuilder,
hintText: hintText ?? this.hintText,
border: border ?? this.border,
borderRadius: borderRadius ?? this.borderRadius,
filled: filled ?? this.filled,
statesController: statesController ?? this.statesController,
magnifierConfiguration:
magnifierConfiguration ?? this.magnifierConfiguration,
spellCheckConfiguration:
spellCheckConfiguration ?? this.spellCheckConfiguration,
features: features ?? this.features,
submitFormatters: submitFormatters ?? this.submitFormatters,
);
}