merge method
Merges this object with other, returning a new object of type T.
Implementation
@override
BoxSpecAttribute merge(BoxSpecAttribute? other) {
if (other == null) return this;
return BoxSpecAttribute(
alignment: other.alignment ?? alignment,
padding: padding?.merge(other.padding) ?? other.padding,
margin: margin?.merge(other.margin) ?? other.margin,
constraints: constraints?.merge(other.constraints) ?? other.constraints,
decoration: decoration?.merge(other.decoration) ?? other.decoration,
foregroundDecoration:
foregroundDecoration?.merge(other.foregroundDecoration) ??
other.foregroundDecoration,
transform: other.transform ?? transform,
transformAlignment: other.transformAlignment ?? transformAlignment,
clipBehavior: other.clipBehavior ?? clipBehavior,
width: other.width ?? width,
height: other.height ?? height,
animated: animated?.merge(other.animated) ?? other.animated,
);
}