clearSemantics method
override
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
@override
void clearSemantics() {
super.clearSemantics();
_backgroundSemanticsNodes = null;
_foregroundSemanticsNodes = null;
}