merge method

  1. @override
ImageSpecAttribute merge(
  1. covariant ImageSpecAttribute? other
)
override

Merges this object with other, returning a new object of type T.

Implementation

@override
ImageSpecAttribute merge(covariant ImageSpecAttribute? other) {
  if (other == null) return this;

  return ImageSpecAttribute(
    centerSlice: other.centerSlice ?? centerSlice,
    width: other.width ?? width,
    height: other.height ?? height,
    color: color?.merge(other.color) ?? other.color,
    repeat: other.repeat ?? repeat,
    fit: other.fit ?? fit,
    alignment: other.alignment ?? alignment,
    colorBlendMode: other.colorBlendMode ?? colorBlendMode,
    filterQuality: other.filterQuality ?? filterQuality,
    animated: other.animated ?? animated,
  );
}