merge method
This style, with any unset field taken from other, field by field —
the per-type overrides included.
Implementation
AlertStyle merge(AlertStyle? other) {
if (other == null) {
return this;
}
return AlertStyle(
color: color ?? other.color,
backgroundColor: backgroundColor ?? other.backgroundColor,
icon: icon ?? other.icon,
iconSize: iconSize ?? other.iconSize,
showIcon: showIcon ?? other.showIcon,
title: title ?? other.title,
titleStyle: titleStyle ?? other.titleStyle,
titleGap: titleGap ?? other.titleGap,
textStyle: textStyle ?? other.textStyle,
barWidth: barWidth ?? other.barWidth,
borderRadius: borderRadius ?? other.borderRadius,
padding: padding ?? other.padding,
margin: margin ?? other.margin,
note: note?.merge(other.note) ?? other.note,
tip: tip?.merge(other.tip) ?? other.tip,
important: important?.merge(other.important) ?? other.important,
warning: warning?.merge(other.warning) ?? other.warning,
caution: caution?.merge(other.caution) ?? other.caution,
);
}