operator + method

ShapeBorder operator + (
  1. ShapeBorder other
)
inherited

Creates a new border consisting of the two borders on either side of the operator.

If the borders belong to classes that know how to add themselves, then this results in a new border that represents the intelligent addition of those two borders (see add). Otherwise, an object is returned that merely paints the two borders sequentially, with the left hand operand on the inside and the right hand operand on the outside.

Implementation

ShapeBorder operator +(ShapeBorder other) {
  return add(other) ?? other.add(this, reversed: true) ?? _CompoundBorder(<ShapeBorder>[other, this]);
}