merge static method

BoundingBox? merge(
  1. BoundingBox? leftBox,
  2. BoundingBox? rightBox
)

Implementation

static BoundingBox? merge(BoundingBox? leftBox, BoundingBox? rightBox) {
  if (leftBox == null) {
    return rightBox;
  }
  if (rightBox == null) {
    return leftBox;
  }
  return BoundingBox(
    leftBox._image,
    leftBox._topLeft,
    leftBox._bottomLeft,
    rightBox._topRight,
    rightBox._bottomRight,
  );
}