copyWith method

TextField copyWith({
  1. Key? key,
  2. TextEditingController? controller,
  3. String? initialValue,
  4. FocusNode? focusNode,
  5. UndoHistoryController? undoController,
  6. BoxDecoration? decoration,
  7. EdgeInsetsGeometry? padding,
  8. Widget? placeholder,
  9. Widget? leading,
  10. Widget? trailing,
  11. CrossAxisAlignment? crossAxisAlignment,
  12. String? clearButtonSemanticLabel,
  13. TextInputType? keyboardType,
  14. TextInputAction? textInputAction,
  15. TextCapitalization? textCapitalization,
  16. TextStyle? style,
  17. StrutStyle? strutStyle,
  18. TextAlign? textAlign,
  19. TextAlignVertical? textAlignVertical,
  20. TextDirection? textDirection,
  21. bool? readOnly,
  22. bool? showCursor,
  23. bool? autofocus,
  24. String? obscuringCharacter,
  25. bool? obscureText,
  26. bool? autocorrect,
  27. SmartDashesType? smartDashesType,
  28. SmartQuotesType? smartQuotesType,
  29. bool? enableSuggestions,
  30. int? maxLines,
  31. int? minLines,
  32. bool? expands,
  33. int? maxLength,
  34. MaxLengthEnforcement? maxLengthEnforcement,
  35. ValueChanged<String>? onChanged,
  36. VoidCallback? onEditingComplete,
  37. ValueChanged<String>? onSubmitted,
  38. TapRegionCallback? onTapOutside,
  39. TapRegionCallback? onTapUpOutside,
  40. List<TextInputFormatter>? inputFormatters,
  41. bool? enabled,
  42. double? cursorWidth,
  43. double? cursorHeight,
  44. Radius? cursorRadius,
  45. bool? cursorOpacityAnimates,
  46. Color? cursorColor,
  47. BoxHeightStyle? selectionHeightStyle,
  48. BoxWidthStyle? selectionWidthStyle,
  49. Brightness? keyboardAppearance,
  50. EdgeInsets? scrollPadding,
  51. bool? enableInteractiveSelection,
  52. TextSelectionControls? selectionControls,
  53. GestureTapCallback? onTap,
  54. ScrollController? scrollController,
  55. ScrollPhysics? scrollPhysics,
  56. Iterable<String>? autofillHints,
  57. Clip? clipBehavior,
  58. String? restorationId,
  59. bool? stylusHandwritingEnabled,
  60. bool? enableIMEPersonalizedLearning,
  61. ContentInsertionConfiguration? contentInsertionConfiguration,
  62. EditableTextContextMenuBuilder? contextMenuBuilder,
  63. String? hintText,
  64. bool? border,
  65. BorderRadiusGeometry? borderRadius,
  66. bool? filled,
  67. WidgetStatesController? statesController,
  68. TextMagnifierConfiguration? magnifierConfiguration,
  69. SpellCheckConfiguration? spellCheckConfiguration,
  70. List<InputFeature>? features,
  71. 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,
  );
}