merge method
Merges this style with another, with the other style taking precedence.
Implementation
PillStyle merge(PillStyle? other) {
if (other == null) return this;
return PillStyle(
backgroundColor: other.backgroundColor ?? backgroundColor,
borderColor: other.borderColor ?? borderColor,
labelColor: other.labelColor ?? labelColor,
valueColor: other.valueColor ?? valueColor,
dividerColor: other.dividerColor ?? dividerColor,
borderWidth: other.borderWidth ?? borderWidth,
borderRadius: other.borderRadius ?? borderRadius,
labelFontWeight: other.labelFontWeight ?? labelFontWeight,
valueFontWeight: other.valueFontWeight ?? valueFontWeight,
fontSize: other.fontSize ?? fontSize,
selectedBackgroundColor:
other.selectedBackgroundColor ?? selectedBackgroundColor,
selectedBorderColor: other.selectedBorderColor ?? selectedBorderColor,
selectedBorderWidth: other.selectedBorderWidth ?? selectedBorderWidth,
);
}