copyWith method

InputDecoration copyWith ({Widget icon, String labelText, TextStyle labelStyle, String helperText, TextStyle helperStyle, String hintText, TextStyle hintStyle, int hintMaxLines, String errorText, TextStyle errorStyle, int errorMaxLines, bool hasFloatingPlaceholder, bool isDense, EdgeInsetsGeometry contentPadding, Widget prefixIcon, Widget prefix, String prefixText, TextStyle prefixStyle, Widget suffixIcon, Widget suffix, String suffixText, TextStyle suffixStyle, Widget counter, String counterText, TextStyle counterStyle, bool filled, Color fillColor, Color focusColor, Color hoverColor, InputBorder errorBorder, InputBorder focusedBorder, InputBorder focusedErrorBorder, InputBorder disabledBorder, InputBorder enabledBorder, InputBorder border, bool enabled, String semanticCounterText, bool alignLabelWithHint })

Creates a copy of this input decoration with the given fields replaced by the new values.

Always sets isCollapsed to false.

Implementation

InputDecoration copyWith({
  Widget icon,
  String labelText,
  TextStyle labelStyle,
  String helperText,
  TextStyle helperStyle,
  String hintText,
  TextStyle hintStyle,
  int hintMaxLines,
  String errorText,
  TextStyle errorStyle,
  int errorMaxLines,
  bool hasFloatingPlaceholder,
  bool isDense,
  EdgeInsetsGeometry contentPadding,
  Widget prefixIcon,
  Widget prefix,
  String prefixText,
  TextStyle prefixStyle,
  Widget suffixIcon,
  Widget suffix,
  String suffixText,
  TextStyle suffixStyle,
  Widget counter,
  String counterText,
  TextStyle counterStyle,
  bool filled,
  Color fillColor,
  Color focusColor,
  Color hoverColor,
  InputBorder errorBorder,
  InputBorder focusedBorder,
  InputBorder focusedErrorBorder,
  InputBorder disabledBorder,
  InputBorder enabledBorder,
  InputBorder border,
  bool enabled,
  String semanticCounterText,
  bool alignLabelWithHint,
}) {
  return InputDecoration(
    icon: icon ?? this.icon,
    labelText: labelText ?? this.labelText,
    labelStyle: labelStyle ?? this.labelStyle,
    helperText: helperText ?? this.helperText,
    helperStyle: helperStyle ?? this.helperStyle,
    hintText: hintText ?? this.hintText,
    hintStyle: hintStyle ?? this.hintStyle,
    hintMaxLines: hintMaxLines ?? this.hintMaxLines,
    errorText: errorText ?? this.errorText,
    errorStyle: errorStyle ?? this.errorStyle,
    errorMaxLines: errorMaxLines ?? this.errorMaxLines,
    hasFloatingPlaceholder: hasFloatingPlaceholder ?? this.hasFloatingPlaceholder,
    isDense: isDense ?? this.isDense,
    contentPadding: contentPadding ?? this.contentPadding,
    prefixIcon: prefixIcon ?? this.prefixIcon,
    prefix: prefix ?? this.prefix,
    prefixText: prefixText ?? this.prefixText,
    prefixStyle: prefixStyle ?? this.prefixStyle,
    suffixIcon: suffixIcon ?? this.suffixIcon,
    suffix: suffix ?? this.suffix,
    suffixText: suffixText ?? this.suffixText,
    suffixStyle: suffixStyle ?? this.suffixStyle,
    counter: counter ?? this.counter,
    counterText: counterText ?? this.counterText,
    counterStyle: counterStyle ?? this.counterStyle,
    filled: filled ?? this.filled,
    fillColor: fillColor ?? this.fillColor,
    focusColor: focusColor ?? this.focusColor,
    hoverColor: hoverColor ?? this.hoverColor,
    errorBorder: errorBorder ?? this.errorBorder,
    focusedBorder: focusedBorder ?? this.focusedBorder,
    focusedErrorBorder: focusedErrorBorder ?? this.focusedErrorBorder,
    disabledBorder: disabledBorder ?? this.disabledBorder,
    enabledBorder: enabledBorder ?? this.enabledBorder,
    border: border ?? this.border,
    enabled: enabled ?? this.enabled,
    semanticCounterText: semanticCounterText ?? this.semanticCounterText,
    alignLabelWithHint: alignLabelWithHint ?? this.alignLabelWithHint,
  );
}