W3cubDocs

/Dart 2

children property

List<Element> children

List of the direct children of this element.

This collection can be used to add and remove elements from the document.

var item = new DivElement();
item.text = 'Something';
document.body.children.add(item) // Item is now displayed on the page.
for (var element in document.body.children) {
  element.style.background = 'red'; // Turns every child of body red.
}

Implementation

List<Element> get children => new FilteredElementList(this);
void children= (List<Element> value)

Implementation

set children(List<Element> value) {
  final children = this.children;
  children.clear();
  children.addAll(value);
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-svg/SvgElement/children.html