merge method
- InputDecorationThemeData? other
Returns a copy of this InputDecorationThemeData where the non-null fields in the given InputDecorationThemeData override the corresponding nullable fields in this InputDecorationThemeData.
The non-nullable fields of InputDecorationThemeData, such as floatingLabelBehavior, isDense, isCollapsed, filled, and alignLabelWithHint cannot be overridden.
In other words, the fields of the provided InputDecorationThemeData are used to fill in the unspecified and nullable fields of this InputDecorationThemeData.
Implementation
InputDecorationThemeData merge(InputDecorationThemeData? other) {
if (other == null) {
return this;
}
return copyWith(
labelStyle: labelStyle ?? other.labelStyle,
floatingLabelStyle: floatingLabelStyle ?? other.floatingLabelStyle,
helperStyle: helperStyle ?? other.helperStyle,
helperMaxLines: helperMaxLines ?? other.helperMaxLines,
hintStyle: hintStyle ?? other.hintStyle,
hintFadeDuration: hintFadeDuration ?? other.hintFadeDuration,
hintMaxLines: hintMaxLines ?? other.hintMaxLines,
errorStyle: errorStyle ?? other.errorStyle,
errorMaxLines: errorMaxLines ?? other.errorMaxLines,
contentPadding: contentPadding ?? other.contentPadding,
iconColor: iconColor ?? other.iconColor,
prefixStyle: prefixStyle ?? other.prefixStyle,
prefixIconColor: prefixIconColor ?? other.prefixIconColor,
prefixIconConstraints: prefixIconConstraints ?? other.prefixIconConstraints,
suffixStyle: suffixStyle ?? other.suffixStyle,
suffixIconColor: suffixIconColor ?? other.suffixIconColor,
suffixIconConstraints: suffixIconConstraints ?? other.suffixIconConstraints,
counterStyle: counterStyle ?? other.counterStyle,
fillColor: fillColor ?? other.fillColor,
activeIndicatorBorder: activeIndicatorBorder ?? other.activeIndicatorBorder,
outlineBorder: outlineBorder ?? other.outlineBorder,
focusColor: focusColor ?? other.focusColor,
hoverColor: hoverColor ?? other.hoverColor,
errorBorder: errorBorder ?? other.errorBorder,
focusedBorder: focusedBorder ?? other.focusedBorder,
focusedErrorBorder: focusedErrorBorder ?? other.focusedErrorBorder,
disabledBorder: disabledBorder ?? other.disabledBorder,
enabledBorder: enabledBorder ?? other.enabledBorder,
border: border ?? other.border,
constraints: constraints ?? other.constraints,
visualDensity: visualDensity ?? other.visualDensity,
);
}