intersect method

RelativeRect intersect(
  1. RelativeRect other
)

Returns a new rectangle that is the intersection of the given rectangle and this rectangle.

Implementation

RelativeRect intersect(RelativeRect other) {
  return RelativeRect.fromLTRB(
    math.max(left, other.left),
    math.max(top, other.top),
    math.max(right, other.right),
    math.max(bottom, other.bottom),
  );
}