union method

Bounds union(
  1. Bounds other
)

Returns the union with another bounds.

Implementation

Bounds union(Bounds other) {
  return Bounds.fromLTRB(
    left < other.left ? left : other.left,
    top < other.top ? top : other.top,
    right > other.right ? right : other.right,
    bottom > other.bottom ? bottom : other.bottom,
  );
}