insertAfter method

bool insertAfter (
  1. TextBit another
)

Inserts self after another in the text tree.

Implementation

bool insertAfter(TextBit another) {
  if (parent == null) return false;

  assert(parent == another.parent);
  final siblings = parent._children;
  final i = siblings.indexOf(another);
  if (i == -1) return false;

  siblings.insert(i + 1, this);
  return true;
}