merge method
This style with the non-null properties of other layered on top.
Merging is per-property, so overriding only borderRadius keeps every
resolved colour.
Implementation
FluentAvatarStyle merge(FluentAvatarStyle? other) {
if (other == null) return this;
return FluentAvatarStyle(
backgroundColor: other.backgroundColor ?? backgroundColor,
foregroundColor: other.foregroundColor ?? foregroundColor,
borderColor: other.borderColor ?? borderColor,
borderWidth: other.borderWidth ?? borderWidth,
borderRadius: other.borderRadius ?? borderRadius,
ringColor: other.ringColor ?? ringColor,
ringGapColor: other.ringGapColor ?? ringGapColor,
ringWidth: other.ringWidth ?? ringWidth,
textStyle: other.textStyle ?? textStyle,
iconSize: other.iconSize ?? iconSize,
diameter: other.diameter ?? diameter,
);
}