apply method
Apply this delta (redo). Replaces affected nodes with their post-mutation state and restores the post-mutation cursor.
Implementation
@override
void apply(FluentDocument document) {
if (index < 0 || index >= document.content.nodes.length) {
print('[UNDO_WARN] NodeDeleteDelta.apply index $index out of bounds');
return;
}
document.content.nodes.removeAt(index);
document.invalidateNodeIndex();
newCursor.restore(document);
}