readElements method

({Map<String, Element> elements, InspectTree tree}) readElements()

read, and the element behind each node, by id.

For a caller that has to act on a node it found: an id is a position, so it stops naming the same widget the moment the screen moves — a lazy list that scrolls renumbers its rows — and the element is what is still the same widget afterwards.

Implementation

({InspectTree tree, Map<String, Element> elements}) readElements() {
  var elements = <String, Element>{};
  var tree = _build(elements: elements).tree;
  return (tree: tree, elements: elements);
}