feat(replay_bloc): expose List<State>
from ReplayBloc
/ReplayCubit
similar to ReplaySubject
#3810
Labels
enhancement candidate
Candidate for enhancement but additional research is needed
pkg:replay_bloc
This issue is related to the replay_bloc package
Description
Please consider exposing a
List<State>
fromReplayBloc
/ReplayCubit
similar toReplaySubject
. This would allow for easy access to previouslimit
number of states.Desired Solution
I would like to have handy access to previous states without having to manually cache them. Also you could allow specifying no of steps to
undo
/redo
, e.g.:undo([int steps = 1])
. Maybe even using an index, e.g.:undoToIndex(int index)
which could be helpful to reset say aHydratedBloc
used in conjuncture with aReplayBloc
to initial state at any given point withundoToIndex(0)
.Might be some value to also allowing
undoTo(State state)
even though a state could be directly emitted.Alternatives Considered
Manually caching states, which is not scalable/reusable.
The text was updated successfully, but these errors were encountered: