merge method
Creates a copy of this AvatarStyle but with the given fields replaced with the new values.
Implementation
AvatarStyle merge(AvatarStyle? other) {
// if null return current object
if (other == null) return this;
return copyWith(
size: other.size,
shape: other.shape,
margin: other.margin,
clipBehavior: other.clipBehavior,
shadowColor: other.shadowColor,
elevation: other.elevation,
foregroundStyle: other.foregroundStyle,
foregroundColor: other.foregroundColor,
foregroundOpacity: other.foregroundOpacity,
foregroundAlpha: other.foregroundAlpha,
foregroundSpacing: other.foregroundSpacing,
backgroundColor: other.backgroundColor,
backgroundOpacity: other.backgroundOpacity,
backgroundAlpha: other.backgroundAlpha,
borderColor: other.borderColor,
borderOpacity: other.borderOpacity,
borderAlpha: other.borderAlpha,
borderWidth: other.borderWidth,
borderRadius: other.borderRadius,
borderStyle: other.borderStyle,
);
}