mergeNode method

bool mergeNode(
  1. T? other, {
  2. bool onlyConsecutive = true,
})

Implementation

bool mergeNode(T? other, {bool onlyConsecutive = true}) {
  if (onlyConsecutive) {
    if (isPreviousNode(other)) {
      return getSiblingRuntime(other)!
          .mergeNode(node, onlyConsecutive: false);
    } else if (!isNextNode(other)) {
      return false;
    }
  }

  if (hasParent) {
    parentRuntime!.removeNode(other);
  }

  absorbNode(other);
  return true;
}