delete method
Implementation
void delete(int start, int end) {
final safeStart = start.clamp(0, length);
final safeEnd = end.clamp(safeStart, length);
if (safeStart == safeEnd) return;
var root = _root.remove(safeStart, safeEnd) ?? _Leaf('');
while (root is _Internal && root.children.length == 1) {
root = root.children.first;
}
_root = root;
}