copyWith method

InputDecoration copyWith({
  1. Widget? hint,
  2. String? hintText,
  3. TextStyle? hintStyle,
  4. int? hintMaxLines,
  5. String? helperText,
  6. Widget? error,
  7. String? errorText,
  8. TextStyle? errorStyle,
  9. int? errorMaxLines,
  10. Widget? counter,
  11. String? counterText,
  12. TextStyle? counterStyle,
  13. Widget? prefix,
  14. String? prefixText,
  15. TextStyle? prefixStyle,
  16. Widget? suffix,
  17. String? suffixText,
  18. TextStyle? suffixStyle,
  19. Widget? prefixIcon,
  20. Widget? suffixIcon,
  21. BoxConstraints? prefixIconConstraints,
  22. BoxConstraints? suffixIconConstraints,
  23. BoxConstraints? constraints,
  24. EdgeInsetsGeometry? contentPadding,
  25. bool? isDense,
  26. bool? isCollapsed,
  27. bool? filled,
  28. Color? fillColor,
  29. Color? hoverColor,
  30. InputBorder? border,
  31. InputBorder? enabledBorder,
  32. InputBorder? disabledBorder,
  33. InputBorder? focusedBorder,
  34. InputBorder? errorBorder,
  35. InputBorder? focusedErrorBorder,
  36. bool? enabled,
})

Implementation

InputDecoration copyWith({
  Widget? hint,
  String? hintText,
  TextStyle? hintStyle,
  int? hintMaxLines,
  String? helperText,
  Widget? error,
  String? errorText,
  TextStyle? errorStyle,
  int? errorMaxLines,
  Widget? counter,
  String? counterText,
  TextStyle? counterStyle,
  Widget? prefix,
  String? prefixText,
  TextStyle? prefixStyle,
  Widget? suffix,
  String? suffixText,
  TextStyle? suffixStyle,
  Widget? prefixIcon,
  Widget? suffixIcon,
  BoxConstraints? prefixIconConstraints,
  BoxConstraints? suffixIconConstraints,
  BoxConstraints? constraints,
  EdgeInsetsGeometry? contentPadding,
  bool? isDense,
  bool? isCollapsed,
  bool? filled,
  Color? fillColor,
  Color? hoverColor,
  InputBorder? border,
  InputBorder? enabledBorder,
  InputBorder? disabledBorder,
  InputBorder? focusedBorder,
  InputBorder? errorBorder,
  InputBorder? focusedErrorBorder,
  bool? enabled,
}) {
  return InputDecoration(
    hint: hint ?? this.hint,
    hintText: hintText ?? this.hintText,
    hintStyle: hintStyle ?? this.hintStyle,
    hintMaxLines: hintMaxLines ?? this.hintMaxLines,
    helperText: helperText ?? this.helperText,
    error: error ?? this.error,
    errorText: errorText ?? this.errorText,
    errorStyle: errorStyle ?? this.errorStyle,
    errorMaxLines: errorMaxLines ?? this.errorMaxLines,
    counter: counter ?? this.counter,
    counterText: counterText ?? this.counterText,
    counterStyle: counterStyle ?? this.counterStyle,
    prefix: prefix ?? this.prefix,
    prefixText: prefixText ?? this.prefixText,
    prefixStyle: prefixStyle ?? this.prefixStyle,
    suffix: suffix ?? this.suffix,
    suffixText: suffixText ?? this.suffixText,
    suffixStyle: suffixStyle ?? this.suffixStyle,
    prefixIcon: prefixIcon ?? this.prefixIcon,
    suffixIcon: suffixIcon ?? this.suffixIcon,
    prefixIconConstraints:
        prefixIconConstraints ?? this.prefixIconConstraints,
    suffixIconConstraints:
        suffixIconConstraints ?? this.suffixIconConstraints,
    constraints: constraints ?? this.constraints,
    contentPadding: contentPadding ?? this.contentPadding,
    isDense: isDense ?? this.isDense,
    isCollapsed: isCollapsed ?? this.isCollapsed,
    filled: filled ?? this.filled,
    fillColor: fillColor ?? this.fillColor,
    hoverColor: hoverColor ?? this.hoverColor,
    border: border ?? this.border,
    enabledBorder: enabledBorder ?? this.enabledBorder,
    disabledBorder: disabledBorder ?? this.disabledBorder,
    focusedBorder: focusedBorder ?? this.focusedBorder,
    errorBorder: errorBorder ?? this.errorBorder,
    focusedErrorBorder: focusedErrorBorder ?? this.focusedErrorBorder,
    enabled: enabled ?? this.enabled,
  );
}