addTo method Null safety

void addTo(
  1. DisplayObjectParent<DisplayObject> parent
)

Add this display object to the specified parent.

Implementation

void addTo(DisplayObjectParent parent) {
  parent.addChild(this);
}