parent property
Component?
get
parent
inherited
Who owns this component in the component tree.
This can be null if the component hasn't been added to the component tree yet, or if it is the root of component tree.
Setting this property to null is equivalent to removeFromParent
.
Implementation
Component? get parent => _parent;
set
parent
(Component? newParent)
inherited
Implementation
set parent(Component? newParent) {
if (newParent == null) {
removeFromParent();
} else {
addToParent(newParent);
}
}