isNextNode method

bool isNextNode(
  1. T? other
)

Implementation

bool isNextNode(T? other) {
  var otherRuntime = getSiblingRuntime(other);
  if (otherRuntime == null) return false;

  var idx = indexInParent;
  var otherIdx = otherRuntime.indexInParent;
  return idx >= 0 && idx + 1 == otherIdx;
}