undo method
Revert the previous operation if there is one.
Implementation
void undo() {
if (history.isNotEmpty) {
index = history.removeLast();
}
}
Revert the previous operation if there is one.
void undo() {
if (history.isNotEmpty) {
index = history.removeLast();
}
}