merge method

Merges this InputDecoration with the other

Implementation

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