paintBounds property

  1. @override
Rect get paintBounds
override

An estimate of the bounds within which this render object will paint. Useful for debugging flags such as debugPaintLayerBordersEnabled.

These are also the bounds used by showOnScreen to make a RenderObject visible on screen.

Implementation

@override
Rect get paintBounds {
  switch (constraints.axis) {
    case Axis.horizontal:
      return Rect.fromLTWH(
        0.0, 0.0,
        geometry!.paintExtent,
        constraints.crossAxisExtent,
      );
    case Axis.vertical:
      return Rect.fromLTWH(
        0.0, 0.0,
        constraints.crossAxisExtent,
        geometry!.paintExtent,
      );
  }
}