undoState method

SnapState<T>? undoState()

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;
}