chainAt method

List<InspectNode> chainAt(
  1. double x,
  2. double y
)

Every on-stage node whose box contains (x, y), outermost first.

The chain, not the innermost hit, because the thing under a cursor is usually a Text and the thing you meant is the button around it — and because the chain is where the layout answer is: the Row three levels out is what has the crossAxisAlignment.

Rectangles only, like nodeAtPoint: no transforms, no clips. Run it over a filtered tree — measured, the unfiltered chain is 35 nodes of which 20 are the same root wrapper run present under every point on every screen.

Implementation

List<InspectNode> chainAt(double x, double y) => [
  for (var node in _onstage)
    if (node.layout case var layout?)
      if (x >= layout.x &&
          y >= layout.y &&
          x < layout.x + layout.width &&
          y < layout.y + layout.height)
        node,
];