allElements property

Iterable<Element> allElements

All elements currently in the widget tree (lazy pre-order traversal).

The returned iterable is lazy. It does not walk the entire widget tree immediately, but rather a chunk at a time as the iteration progresses using Iterator.moveNext.

Implementation

Iterable<Element> get allElements {
  TestAsyncUtils.guardSync();
  return collectAllElementsFrom(binding.rootElement!, skipOffstage: false);
}