Update the semantics for all render objects.
This function is one of the core stages of the rendering pipeline. The semantics are compiled after painting and only after RenderObject.scheduleInitialSemantics has been called.
See RendererBinding for an example of how this function is used.
Source
void flushSemantics() { if (_semanticsOwner == null) return; Timeline.startSync('Semantics'); assert(_semanticsOwner != null); assert(() { _debugDoingSemantics = true; return true; }); try { _nodesNeedingSemantics.sort((RenderObject a, RenderObject b) => a.depth - b.depth); for (RenderObject node in _nodesNeedingSemantics) { if (node._needsSemanticsUpdate && node.owner == this) node._updateSemantics(); } _semanticsOwner.sendSemanticsUpdate(); } finally { _nodesNeedingSemantics.clear(); assert(() { _debugDoingSemantics = false; return true; }); Timeline.finishSync(); } }