update undo package
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
class Change<T> {
|
||||
Change(
|
||||
this._oldValue,
|
||||
this._execute(),
|
||||
this._undo(T oldValue), {
|
||||
this.description = '',
|
||||
});
|
||||
|
||||
final String description;
|
||||
|
||||
final void Function() _execute;
|
||||
final T _oldValue;
|
||||
|
||||
final void Function(T oldValue) _undo;
|
||||
|
||||
void execute() {
|
||||
_execute();
|
||||
}
|
||||
|
||||
void undo() {
|
||||
_undo(_oldValue);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user