operator + method

Rect operator +(
  1. Rect other
)

Implementation

Rect operator +(Rect other) {
  final double newX = math.min(x, other.x);
  final double newY = math.min(y, other.y);
  final double newRight = math.max(right, other.right);
  final double newBottom = math.max(bottom, other.bottom);
  return Rect.fromXYWH(newX, newY, newRight - newX, newBottom - newY);
}