copyWith method
CupertinoTextFieldConfiguration
copyWith({
- TextEditingController? controller,
- FocusNode? focusNode,
- BoxDecoration? decoration,
- EdgeInsetsGeometry? padding,
- String? placeholder,
- Widget? prefix,
- OverlayVisibilityMode? prefixMode,
- Widget? suffix,
- OverlayVisibilityMode? suffixMode,
- OverlayVisibilityMode? clearButtonMode,
- TextInputType? keyboardType,
- TextInputAction? textInputAction,
- TextCapitalization? textCapitalization,
- TextStyle? style,
- TextAlign? textAlign,
- bool? autofocus,
- bool? obscureText,
- bool? autocorrect,
- int? maxLines,
- int? minLines,
- int? maxLength,
- MaxLengthEnforcement? maxLengthEnforcement,
- ValueChanged<
String> ? onChanged, - VoidCallback? onEditingComplete,
- GestureTapCallback? onTap,
- ValueChanged<
String> ? onSubmitted, - List<
TextInputFormatter> ? inputFormatters, - bool? enabled,
- bool? enableSuggestions,
- double? cursorWidth,
- Radius? cursorRadius,
- Color? cursorColor,
- Brightness? keyboardAppearance,
- EdgeInsets? scrollPadding,
- bool? enableInteractiveSelection,
Copies the CupertinoTextFieldConfiguration and only changes the specified properties
Implementation
CupertinoTextFieldConfiguration copyWith({
TextEditingController? controller,
FocusNode? focusNode,
BoxDecoration? decoration,
EdgeInsetsGeometry? padding,
String? placeholder,
Widget? prefix,
OverlayVisibilityMode? prefixMode,
Widget? suffix,
OverlayVisibilityMode? suffixMode,
OverlayVisibilityMode? clearButtonMode,
TextInputType? keyboardType,
TextInputAction? textInputAction,
TextCapitalization? textCapitalization,
TextStyle? style,
TextAlign? textAlign,
bool? autofocus,
bool? obscureText,
bool? autocorrect,
int? maxLines,
int? minLines,
int? maxLength,
MaxLengthEnforcement? maxLengthEnforcement,
ValueChanged<String>? onChanged,
VoidCallback? onEditingComplete,
GestureTapCallback? onTap,
ValueChanged<String>? onSubmitted,
List<TextInputFormatter>? inputFormatters,
bool? enabled,
bool? enableSuggestions,
double? cursorWidth,
Radius? cursorRadius,
Color? cursorColor,
Brightness? keyboardAppearance,
EdgeInsets? scrollPadding,
bool? enableInteractiveSelection,
}) {
return CupertinoTextFieldConfiguration(
controller: controller ?? this.controller,
focusNode: focusNode ?? this.focusNode,
decoration: decoration ?? this.decoration,
padding: padding ?? this.padding,
placeholder: placeholder ?? this.placeholder,
prefix: prefix ?? this.prefix,
prefixMode: prefixMode ?? this.prefixMode,
suffix: suffix ?? this.suffix,
suffixMode: suffixMode ?? this.suffixMode,
clearButtonMode: clearButtonMode ?? this.clearButtonMode,
keyboardType: keyboardType ?? this.keyboardType,
textInputAction: textInputAction ?? this.textInputAction,
textCapitalization: textCapitalization ?? this.textCapitalization,
style: style ?? this.style,
textAlign: textAlign ?? this.textAlign,
autofocus: autofocus ?? this.autofocus,
obscureText: obscureText ?? this.obscureText,
autocorrect: autocorrect ?? this.autocorrect,
maxLines: maxLines ?? this.maxLines,
minLines: minLines ?? this.minLines,
maxLength: maxLength ?? this.maxLength,
maxLengthEnforcement: maxLengthEnforcement ?? this.maxLengthEnforcement,
onChanged: onChanged ?? this.onChanged,
onEditingComplete: onEditingComplete ?? this.onEditingComplete,
onTap: onTap ?? this.onTap,
onSubmitted: onSubmitted ?? this.onSubmitted,
inputFormatters: inputFormatters ?? this.inputFormatters,
enabled: enabled ?? this.enabled,
enableSuggestions: enableSuggestions ?? this.enableSuggestions,
cursorWidth: cursorWidth ?? this.cursorWidth,
cursorRadius: cursorRadius ?? this.cursorRadius,
cursorColor: cursorColor ?? this.cursorColor,
keyboardAppearance: keyboardAppearance ?? this.keyboardAppearance,
scrollPadding: scrollPadding ?? this.scrollPadding,
enableInteractiveSelection:
enableInteractiveSelection ?? this.enableInteractiveSelection,
);
}