previousSibling property
Return the previous sibling of this node, or null
.
Implementation
@override
XmlNode? get previousSibling {
if (parent != null) {
final siblings = parent!.children;
for (var i = siblings.length - 1; i > 0; i--) {
if (identical(siblings[i], this)) {
return siblings[i - 1];
}
}
}
return null;
}