merge method

WxBorderSide merge(
  1. WxBorderSide? other
)

Creates a WxBorderSide that represents the addition of the two given WxBorderSides.

It is only valid to call this if canMerge returns true for the two sides.

If one of the sides is zero-width with BorderStyle.none, then the other side is return as-is. If both of the sides are zero-width with BorderStyle.none, then WxBorderSide.none is returned.

The arguments must not be null.

Implementation

WxBorderSide merge(WxBorderSide? other) {
  // if null return current object
  if (other == null) return this;

  return copyWith(
    style: other.style,
    color: other.color,
    gradient: other.gradient,
    width: other.width,
    offset: other.offset,
  );
}