HistoryStore<S> class

A store that captures the history and enables undo and redo operations.

Implemented types
Available extensions

Constructors

HistoryStore(Store<S> delegate, {Predicate1<S>? filter, int? limit})
Constructs a history store.

Properties

canRedo bool
Tests if the last action can be redone.
no setter
canUndo bool
Tests if the last change to the store can be undone.
no setter
delegate Store<S>
The store that manages the current state.
final
filter → Predicate1<S>?
An (optional) filter predicate to exclude certain states from the history.
final
future List<S>
Read-only accessor to the future history states.
no setter
hashCode int
The hash code for this object.
no setterinherited
limit int?
An (optional) limit of history states to remember.
final
past List<S>
Read-only accessor to the past history states.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state → S
Returns the current state.
no setteroverride

Methods

clear() → void
Clears the undo/redo history.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
redo() → S
Redoes the last change to the store.
subscribe(Observer<S> observer) Disposable
Subscribes with the provided observer.
override
toString() String
A string representation of this object.
inherited
undo() → S
Undoes the last change to the store.
update(Updater<S> updater) → S
Updates the current state.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited