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. Brightness? keyboardAppearance,
  24. VoidCallback? onEditingComplete,
  25. GestureTapCallback? onTap,
  26. EdgeInsets? scrollPadding,
  27. TextCapitalization? textCapitalization,
  28. TextDirection? textDirection,
  29. TextInputAction? textInputAction,
  30. bool? enableInteractiveSelection,
})

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,
    Brightness? keyboardAppearance,
    VoidCallback? onEditingComplete,
    GestureTapCallback? onTap,
    EdgeInsets? scrollPadding,
    TextCapitalization? textCapitalization,
    TextDirection? textDirection,
    TextInputAction? textInputAction,
    bool? enableInteractiveSelection}) {
  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,
    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,
  );
}