nodes property Null safety

List<Node> nodes

A modifiable list of this node's children.

Implementation

List<Node> get nodes {
  return new _ChildNodeListLazy(this);
}
void nodes= (Iterable<Node> value)

Implementation

set nodes(Iterable<Node> value) {
  // Copy list first since we don't want liveness during iteration.
  // TODO(jacobr): there is a better way to do this.
  var copy = value.toList();
  text = '';
  for (Node node in copy) {
    append(node);
  }
}