child property
PositionComponent?
get
child
The component that will be positioned by this component. The child will be automatically mounted to the current component.
Implementation
PositionComponent? get child => _child;
set
child
(PositionComponent? value)
Implementation
set child(PositionComponent? value) {
final oldChild = _child;
if (oldChild?.parent == this) {
oldChild?.removeFromParent();
}
_child = value;
if (value != null) {
add(value);
}
}