descendants property

Iterable<TreeNode> get descendants

Returns an Iterable of every TreeNode under this.

Implementation

Iterable<TreeNode> get descendants sync* {
  for (final child in _children) {
    yield child;

    if (child.hasChildren) {
      yield* child.descendants;
    }
  }
}