- override
Mark this node as attached to the given owner.
Typically called only from the parent's attach method, and by the
owner to mark the root of a tree as attached.
Subclasses with children should attach all their children to the same
owner whenever this method is called.
Source
@override
void attach(SemanticsOwner owner) {
super.attach(owner);
assert(!owner._nodes.containsKey(id));
owner._nodes[id] = this;
owner._detachedNodes.remove(this);
if (_dirty) {
_dirty = false;
_markDirty();
}
if (parent != null)
_inheritedMergeAllDescendantsIntoThisNode = parent._shouldMergeAllDescendantsIntoThisNode;
if (_children != null) {
for (SemanticsNode child in _children)
child.attach(owner);
}
}