findWidgetPositionByLabel static method

WidgetDetails? findWidgetPositionByLabel(
  1. String label,
  2. num xFactor,
  3. num yFactor
)

Implementation

static WidgetDetails? findWidgetPositionByLabel(
    String label,
    num xFactor,
    num yFactor,
    ) {
  final box = _resolveRenderBox(label);
  if (box == null || !box.hasSize) return null;

  final pos = _globalTopLeft(box);
  final size = box.size;

  return WidgetDetails(
    x: pos.dx,
    y: pos.dy,
    width: size.width,
    height: size.height,
    label: label,
    // no keys exposed
  );
}