clearSemantics method

  1. @mustCallSuper
void clearSemantics ()
@mustCallSuper

Removes all semantics from this render object and its descendants.

Should only be called on objects whose parent is not a RenderObject.

Override this method if you instantiate new SemanticsNodes in an overridden assembleSemanticsNode method, to dispose of those nodes.

Implementation

@mustCallSuper
void clearSemantics() {
  _needsSemanticsUpdate = true;
  _semantics = null;
  visitChildren((RenderObject child) {
    child.clearSemantics();
  });
}