hitDeep method
Deepest node under the point.
Implementation
SceneNode? hitDeep(double x, double y) {
SceneNode? visit(SceneNode n) {
var rect = n.measured;
if (!n.visible || rect == null || !rect.contains(x, y)) return null;
for (var c in n.children.reversed) {
var hit = visit(c);
if (hit != null) return hit;
}
return n == root ? null : n;
}
return visit(root);
}