wideMiddleRect property

Rect wideMiddleRect

The biggest rectangle that is entirely inside the rounded rectangle and has the full width of the rounded rectangle. If the rounded rectangle does not have an axis-aligned intersection of its left and right side, the resulting Rect will have negative width or height.


Rect get wideMiddleRect {
  final double topRadius = math.max(tlRadiusY, trRadiusY);
  final double bottomRadius = math.max(brRadiusY, blRadiusY);
  return Rect.fromLTRB(
    top + topRadius,
    bottom - bottomRadius