undoState method
undo to the last valid state (isWaiting and hasError are ignored)
Implementation
SnapState<T>? undoState() {
if (!canUndoState) {
return null;
}
_redoQueue.add(_undoQueue.removeLast());
// final oldSnapShot = ;
return _undoQueue.last;
}