Skip to main content

tom_undo 0.1.0 copy "tom_undo: ^0.1.0" to clipboard
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 [...]

example/tom_undo_example.dart

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'));
}
0
likes
150
points
48
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

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 part fails. No dependencies.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

More

Packages that depend on tom_undo