nextSibling property

  1. @override
XmlNode? get nextSibling
inherited

Return the next sibling of this node, or null.

Implementation

@override
XmlNode? get nextSibling {
  if (parent != null) {
    final siblings = parent!.children;
    for (var i = 0; i < siblings.length - 1; i++) {
      if (identical(siblings[i], this)) {
        return siblings[i + 1];
      }
    }
  }
  return null;
}