siblings property Null safety

Iterable<XmlNode> siblings

Returns an Iterable over the siblings of this node. If the node has no parent or no siblings, return a collection with just this node.

Implementation

Iterable<XmlNode> get siblings => parent == null ? [this] : parent!.children;