copyWith method

  1. @override
FieldStyleTextField copyWith({
  1. String? labelText,
  2. TextStyle? labelStyle,
  3. TextEditingController? controller,
  4. bool? obscureText,
  5. int? maxLines,
  6. int? minLines,
  7. TextInputType? keyboardType,
  8. bool? autoFocus,
  9. TextAlign? textAlign,
  10. bool? enableSuggestions,
  11. FocusNode? focusNode,
  12. String? hintText,
  13. TextStyle? hintStyle,
  14. String? dummyData,
  15. dynamic onChanged(
    1. String value
    )?,
  16. TextInputAction? textInputAction,
  17. TextStyle? style,
  18. StrutStyle? strutStyle,
  19. TextAlignVertical? textAlignVertical,
  20. TextDirection? textDirection,
  21. String? obscuringCharacter,
  22. bool? autocorrect,
  23. SmartDashesType? smartDashesType,
  24. SmartQuotesType? smartQuotesType,
  25. bool? expands,
  26. bool? readOnly,
  27. bool? showCursor,
  28. int? maxLength,
  29. MouseCursor? mouseCursor,
  30. String? validationErrorMessage,
  31. TextCapitalization textCapitalization = TextCapitalization.none,
  32. MaxLengthEnforcement? maxLengthEnforcement,
  33. AppPrivateCommandCallback? onAppPrivateCommand,
  34. List<TextInputFormatter>? inputFormatters = const [],
  35. bool? enabled = true,
  36. double cursorWidth = 2.0,
  37. double? cursorHeight = 20.0,
  38. Radius? cursorRadius,
  39. Color? cursorColor,
  40. Brightness? keyboardAppearance = Brightness.light,
  41. EdgeInsets? scrollPadding,
  42. TextSelectionControls? selectionControls = null,
  43. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  44. GestureTapCallback? onTap,
  45. TapRegionCallback? onTapOutside,
  46. InputDecoration? decoration,
  47. VoidCallback? onEditingComplete,
  48. ValueChanged<String>? onSubmitted,
  49. ScrollController? scrollController,
  50. ScrollPhysics? scrollPhysics,
  51. Iterable<String>? autofillHints,
  52. Clip? clipBehavior = Clip.hardEdge,
  53. dynamic handleValidationError(
    1. FormValidationResponse handleError
    )?,
  54. bool? passwordVisible,
  55. String? type,
  56. Widget? prefixIcon,
  57. Color? backgroundColor,
  58. BorderRadius? borderRadius,
  59. InputBorder? border,
  60. InputBorder? focusedBorder,
  61. InputBorder? enabledBorder,
  62. EdgeInsetsGeometry? contentPadding,
  63. bool? passwordViewable,
  64. bool? validateOnFocusChange,
  65. bool customValidationRule(
    1. dynamic value
    )?,
  66. Widget? header,
  67. Widget? footer,
  68. bool? clearable,
  69. Widget? clearIcon,
  70. String? mask,
  71. String? maskMatch,
  72. bool? maskedReturnValue,
  73. DecoratorTextField? decorator,
  74. double? headerSpacing,
  75. double? footerSpacing,
  76. bool? filled,
  77. Color? fillColor,
  78. bool? isDense,
  79. Widget? suffixIcon,
})
override

Implementation

@override
FieldStyleTextField copyWith({
  String? labelText,
  TextStyle? labelStyle,
  TextEditingController? controller,
  bool? obscureText,
  int? maxLines,
  int? minLines,
  TextInputType? keyboardType,
  bool? autoFocus,
  TextAlign? textAlign,
  bool? enableSuggestions,
  FocusNode? focusNode,
  String? hintText,
  TextStyle? hintStyle,
  String? dummyData,
  Function(String value)? onChanged,
  TextInputAction? textInputAction,
  TextStyle? style,
  StrutStyle? strutStyle,
  TextAlignVertical? textAlignVertical,
  TextDirection? textDirection,
  String? obscuringCharacter,
  bool? autocorrect,
  SmartDashesType? smartDashesType,
  SmartQuotesType? smartQuotesType,
  bool? expands,
  bool? readOnly,
  bool? showCursor,
  int? maxLength,
  MouseCursor? mouseCursor,
  String? validationErrorMessage,
  TextCapitalization textCapitalization = TextCapitalization.none,
  MaxLengthEnforcement? maxLengthEnforcement,
  AppPrivateCommandCallback? onAppPrivateCommand,
  List<TextInputFormatter>? inputFormatters = const [],
  bool? enabled = true,
  double cursorWidth = 2.0,
  double? cursorHeight = 20.0, // Default height if not provided
  Radius? cursorRadius,
  Color? cursorColor,
  Brightness? keyboardAppearance = Brightness.light, // Default appearance
  EdgeInsets? scrollPadding,
  TextSelectionControls? selectionControls = null, // Default to null
  DragStartBehavior dragStartBehavior =
      DragStartBehavior.start, // Default behavior
  GestureTapCallback? onTap,
  TapRegionCallback? onTapOutside,
  InputDecoration? decoration,
  VoidCallback? onEditingComplete,
  ValueChanged<String>? onSubmitted,
  ScrollController? scrollController,
  ScrollPhysics? scrollPhysics,
  Iterable<String>? autofillHints,
  Clip? clipBehavior = Clip.hardEdge, // Default to hard edge clipping
  Function(FormValidationResponse handleError)? handleValidationError,
  bool? passwordVisible,
  String? type,
  Widget? prefixIcon,
  Color? backgroundColor,
  BorderRadius? borderRadius,
  InputBorder? border,
  InputBorder? focusedBorder,
  InputBorder? enabledBorder,
  EdgeInsetsGeometry? contentPadding,
  bool? passwordViewable,
  bool? validateOnFocusChange,
  bool Function(dynamic value)? customValidationRule,
  Widget? header,
  Widget? footer,
  bool? clearable,
  Widget? clearIcon,
  String? mask,
  String? maskMatch,
  bool? maskedReturnValue,
  DecoratorTextField? decorator,
  double? headerSpacing,
  double? footerSpacing,
  bool? filled,
  Color? fillColor,
  bool? isDense,
  Widget? suffixIcon,
}) {
  return FieldStyleTextField(
    labelText: labelText ?? this.labelText,
    labelStyle: labelStyle ?? this.labelStyle,
    controller: controller ?? this.controller,
    obscureText: obscureText ?? this.obscureText,
    maxLines: maxLines ?? this.maxLines,
    minLines: minLines ?? this.minLines,
    keyboardType: keyboardType ?? this.keyboardType,
    autoFocus: autoFocus ?? this.autoFocus,
    textAlign: textAlign ?? this.textAlign,
    enableSuggestions: enableSuggestions ?? this.enableSuggestions,
    focusNode: focusNode ?? this.focusNode,
    hintText: hintText ?? this.hintText,
    hintStyle: hintStyle ?? this.hintStyle,
    dummyData: dummyData ?? this.dummyData,
    onChanged: onChanged ?? this.onChanged,
    textInputAction: textInputAction ?? this.textInputAction,
    style: style ?? this.style,
    strutStyle: strutStyle ?? this.strutStyle,
    textAlignVertical: textAlignVertical ?? this.textAlignVertical,
    textDirection: textDirection ?? this.textDirection,
    obscuringCharacter: obscuringCharacter ?? this.obscuringCharacter,
    autocorrect: autocorrect ?? this.autocorrect,
    smartDashesType: smartDashesType ?? this.smartDashesType,
    smartQuotesType: smartQuotesType ?? this.smartQuotesType,
    expands: expands ?? this.expands,
    readOnly: readOnly ?? this.readOnly,
    showCursor: showCursor ?? this.showCursor,
    maxLength: maxLength ?? this.maxLength,
    mouseCursor: mouseCursor ?? this.mouseCursor,
    validationErrorMessage:
        validationErrorMessage ?? this.validationErrorMessage,
    textCapitalization: textCapitalization,
    maxLengthEnforcement:
        maxLengthEnforcement ?? MaxLengthEnforcement.enforced,
    onAppPrivateCommand: onAppPrivateCommand,
    inputFormatters: inputFormatters,
    enabled: enabled ?? this.enabled,
    cursorWidth: cursorWidth,
    cursorHeight: cursorHeight ?? this.cursorHeight,
    cursorRadius: cursorRadius ?? this.cursorRadius,
    cursorColor: cursorColor ?? this.cursorColor,
    keyboardAppearance: keyboardAppearance ?? this.keyboardAppearance,
    scrollPadding: scrollPadding ?? this.scrollPadding,
    selectionControls: selectionControls ?? this.selectionControls,
    dragStartBehavior: dragStartBehavior,
    onTap: onTap ?? this.onTap,
    onTapOutside: onTapOutside ?? this.onTapOutside,
    decoration: decoration ?? this.decoration,
    onEditingComplete: onEditingComplete ?? this.onEditingComplete,
    onSubmitted: onSubmitted ?? this.onSubmitted,
    scrollController: scrollController ?? this.scrollController,
    scrollPhysics: scrollPhysics ?? this.scrollPhysics,
    autofillHints: autofillHints ?? this.autofillHints,
    clipBehavior: clipBehavior ?? this.clipBehavior,
    passwordVisible: passwordVisible ?? this.passwordVisible,
    prefixIcon: prefixIcon ?? this.prefixIcon,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    borderRadius: borderRadius ?? this.borderRadius,
    border: border ?? this.border,
    focusedBorder: focusedBorder ?? this.focusedBorder,
    enabledBorder: enabledBorder ?? this.enabledBorder,
    contentPadding: contentPadding ?? this.contentPadding,
    passwordViewable: passwordViewable ?? this.passwordViewable,
    validateOnFocusChange:
        validateOnFocusChange ?? this.validateOnFocusChange,
    customValidationRule: customValidationRule ?? this.customValidationRule,
    header: header ?? this.header,
    footer: footer ?? this.footer,
    clearable: clearable ?? this.clearable,
    clearIcon: clearIcon ?? this.clearIcon,
    mask: mask ?? this.mask,
    maskMatch: maskMatch ?? this.maskMatch,
    maskedReturnValue: maskedReturnValue ?? this.maskedReturnValue,
    decorator: decorator ?? this.decorator,
    fillColor: fillColor ?? this.fillColor,
    filled: filled ?? this.filled,
    isDense: isDense ?? this.isDense,
    suffixIcon: suffixIcon ?? this.suffixIcon,
  );
}