copyWith method

InputDecoration copyWith ({Widget icon, String labelText, TextStyle labelStyle, String helperText, TextStyle helperStyle, String hintText, TextStyle hintStyle, 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, String counterText, TextStyle counterStyle, bool filled, Color fillColor, InputBorder errorBorder, InputBorder focusedBorder, InputBorder focusedErrorBorder, InputBorder disabledBorder, InputBorder enabledBorder, InputBorder border, bool enabled, String semanticCounterText })

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,
  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,
  String counterText,
  TextStyle counterStyle,
  bool filled,
  Color fillColor,
  InputBorder errorBorder,
  InputBorder focusedBorder,
  InputBorder focusedErrorBorder,
  InputBorder disabledBorder,
  InputBorder enabledBorder,
  InputBorder border,
  bool enabled,
  String semanticCounterText,
}) {
  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,
    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,
    counterText: counterText ?? this.counterText,
    counterStyle: counterStyle ?? this.counterStyle,
    filled: filled ?? this.filled,
    fillColor: fillColor ?? this.fillColor,
    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,
  );
}