add method

  1. @override
void add(
  1. Node child
)
override

Add a child node.

Implementation

@override
void add(Node child) {
  if (child._parent != null) {
    throw Exception('Child already has a parent');
  }
  children.add(child);
  child._parent = this;
}