paddingItemRect property

Rect? get paddingItemRect

Bounds of the selected item in global coordinates, or null while it is not laid out yet

Implementation

Rect? get paddingItemRect {
  final renderObject = paddingGlobalKey.currentContext?.findRenderObject();
  if (renderObject == null || !renderObject.attached) {
    return null;
  }
  final topLeft = MatrixUtils.transformPoint(
    renderObject.getTransformTo(null),
    Offset.zero,
  );
  return topLeft & renderObject.semanticBounds.size;
}