semantics method
Returns an immutable semantic snapshot for the current tree.
This is collected on demand so early semantic work has no runtime cost unless tests or debug tools ask for it.
Implementation
SemanticTree semantics() {
_assertNotDisposed('semantics');
final root = _root;
if (root == null) {
throw StateError(
'FleuryTester.semantics called before pumpWidget; the tree is empty.',
);
}
_owner.flushBuild();
return SemanticTree.fromElement(root);
}