copyWith method

TextFieldConfiguration copyWith({
  1. InputDecoration? decoration,
  2. TextStyle? style,
  3. TextEditingController? controller,
  4. ValueChanged<String>? onChanged,
  5. ValueChanged<String>? onSubmitted,
  6. bool? obscureText,
  7. MaxLengthEnforcement? maxLengthEnforcement,
  8. int? maxLength,
  9. int? maxLines,
  10. int? minLines,
  11. bool? autocorrect,
  12. List<TextInputFormatter>? inputFormatters,
  13. bool? autofocus,
  14. TextInputType? keyboardType,
  15. bool? enabled,
  16. bool? enableSuggestions,
  17. TextAlign? textAlign,
  18. FocusNode? focusNode,
  19. Color? cursorColor,
  20. TextAlignVertical? textAlignVertical,
  21. Radius? cursorRadius,
  22. double? cursorWidth,
  23. MouseCursor? mouseCursor,
  24. Brightness? keyboardAppearance,
  25. VoidCallback? onEditingComplete,
  26. GestureTapCallback? onTap,
  27. EdgeInsets? scrollPadding,
  28. TextCapitalization? textCapitalization,
  29. TextDirection? textDirection,
  30. TextInputAction? textInputAction,
  31. bool? enableInteractiveSelection,
  32. 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,
  );
}