descendants property

Iterable<Node<T>> descendants

Returns an Iterable of every Node under this.

Implementation

Iterable<Node<T>> get descendants sync* {
  for (final child in _root.children) {
    yield child;

    if (child.children.isNotEmpty) {
      yield* child.descendants;
    }
  }
}