isNextNode method

bool isNextNode(
  1. DOMNode other
)

Returns true if other is the next sibling of this node parent.

Implementation

bool isNextNode(DOMNode other) {
  if (!isInSameParent(other) || identical(this, other)) return false;
  var idx = indexInParent;
  return idx >= 0 && idx + 1 == other.indexInParent;
}