expandToInclude method

LayoutRange expandToInclude(
  1. LayoutRange other
)

Creates a new range that encompasses both this range and other.

Implementation

LayoutRange expandToInclude(LayoutRange other) {
  return LayoutRange(
    min(start, other.start),
    max(end, other.end),
  );
}