semanticBounds property

  1. @override
Rect get semanticBounds
override

The bounding box, in the local coordinate system, of this object, for accessibility purposes.

Implementation

@override
Rect get semanticBounds {
  // If we laid out the first child but this sliver is not visible, we report the
  // semantic bounds of this sliver as the bounds of the first child. This is necessary
  // for accessibility technologies to reach this sliver even when it is outside
  // the current viewport and cache extent.
  if (geometry != null && !geometry!.visible && firstChild != null && firstChild!.hasSize) {
    return firstChild!.paintBounds;
  }
  return super.semanticBounds;
}