merge method
This style, taking from other what it leaves unset.
Implementation
ButtonStyle merge(ButtonStyle? other) {
if (other == null) {
return this;
}
return ButtonStyle(
foregroundColor: foregroundColor ?? other.foregroundColor,
backgroundColor: backgroundColor ?? other.backgroundColor,
overlayColor: overlayColor ?? other.overlayColor,
textStyle: textStyle ?? other.textStyle,
side: side ?? other.side,
shape: shape ?? other.shape,
padding: padding ?? other.padding,
minimumSize: minimumSize ?? other.minimumSize,
fixedSize: fixedSize ?? other.fixedSize,
maximumSize: maximumSize ?? other.maximumSize,
iconSize: iconSize ?? other.iconSize,
visualDensity: visualDensity ?? other.visualDensity,
tapTargetSize: tapTargetSize ?? other.tapTargetSize,
backgroundBuilder: backgroundBuilder ?? other.backgroundBuilder,
pressLook: pressLook ?? other.pressLook,
ringStandsOff: ringStandsOff ?? other.ringStandsOff,
);
}