undo method
Implementation
Future<void> undo() async {
if (points.isEmpty) return;
final int index = points.length - 1;
points.removeLast();
await controller.removeNode("p$index");
if (index > 0) {
await controller.removeNode("l${index - 1}");
await controller.untrack("m${index - 1}");
}
if (points.isEmpty) {
await controller.removeNode("preview");
_previewReady = false;
}
await _updateClosing();
_notify();
}