removeFromParent method

void removeFromParent()

Removes this display object from its parent.

Implementation

void removeFromParent() {
  if (parent != null) {
    parent.removeChild(this);
  }
}