onUnmount method

  1. @override
void onUnmount()
override

Called when the owning node leaves a live scene graph.

Implementation

@override
void onUnmount() {
  for (final child in _childNodes) {
    node.remove(child);
  }
  _childNodes.clear();
}