destroy method

void destroy()

Destroy this view and its children.

Implementation

void destroy() {
  for (final child in children) {
    if (identical(child.parent, this)) {
      child.destroy();
    }
  }
  parent = null;
}