copyWithDecoration method

InputDecoration copyWithDecoration(
  1. InputDecoration decoration
)

Creates a copy of this input decoration with the given fields replaced by the new values from an InputDecoration passed to the function

Implementation

InputDecoration copyWithDecoration(InputDecoration decoration) => copyWith(
      icon: decoration.icon ?? icon,
      labelText: decoration.labelText ?? labelText,
      labelStyle: decoration.labelStyle ?? labelStyle,
      helperText: decoration.helperText ?? helperText,
      helperStyle: decoration.helperStyle ?? helperStyle,
      helperMaxLines: decoration.helperMaxLines ?? helperMaxLines,
      hintText: decoration.hintText ?? hintText,
      hintStyle: decoration.hintStyle ?? hintStyle,
      hintMaxLines: decoration.hintMaxLines ?? hintMaxLines,
      errorText: decoration.errorText ?? errorText,
      errorStyle: decoration.errorStyle ?? errorStyle,
      errorMaxLines: decoration.errorMaxLines ?? errorMaxLines,
      floatingLabelBehavior:
          decoration.floatingLabelBehavior ?? floatingLabelBehavior,
      isCollapsed: decoration.isCollapsed,
      isDense: decoration.isDense ?? isDense,
      contentPadding: decoration.contentPadding ?? contentPadding,
      prefixIcon: decoration.prefixIcon ?? prefixIcon,
      prefix: decoration.prefix ?? prefix,
      prefixText: decoration.prefixText ?? prefixText,
      prefixStyle: decoration.prefixStyle ?? prefixStyle,
      prefixIconConstraints:
          decoration.prefixIconConstraints ?? prefixIconConstraints,
      suffixIcon: decoration.suffixIcon ?? suffixIcon,
      suffix: decoration.suffix ?? suffix,
      suffixText: decoration.suffixText ?? suffixText,
      suffixStyle: decoration.suffixStyle ?? suffixStyle,
      suffixIconConstraints:
          decoration.suffixIconConstraints ?? suffixIconConstraints,
      counter: decoration.counter ?? counter,
      counterText: decoration.counterText ?? counterText,
      counterStyle: decoration.counterStyle ?? counterStyle,
      filled: decoration.filled ?? filled,
      fillColor: decoration.fillColor ?? fillColor,
      focusColor: decoration.focusColor ?? focusColor,
      hoverColor: decoration.hoverColor ?? hoverColor,
      errorBorder: decoration.errorBorder ?? errorBorder,
      focusedBorder: decoration.focusedBorder ?? focusedBorder,
      focusedErrorBorder: decoration.focusedErrorBorder ?? focusedErrorBorder,
      disabledBorder: decoration.disabledBorder ?? disabledBorder,
      enabledBorder: decoration.enabledBorder ?? enabledBorder,
      border: decoration.border ?? border,
      enabled: decoration.enabled,
      semanticCounterText:
          decoration.semanticCounterText ?? semanticCounterText,
      alignLabelWithHint: decoration.alignLabelWithHint ?? alignLabelWithHint,
    );