tom_undo 0.1.0
tom_undo: ^0.1.0 copied to clipboard
The undo/redo stack every undo history runs on: a bounded stack that applies an entry before moving it, so a failing undo stays undoable, and composite steps that put back what they applied when one p [...]
import 'package:tom_undo/tom_undo.dart';
void main() {
final history = TomUndoStack<String>(maxEntries: 50);
history.push('typed "hello"');
history.undo((entry) => print('undo $entry')); // applied, then moved to redo
history.redo((entry) => print('redo $entry'));
}