feat(replay_bloc): expose `List<State>` from `ReplayBloc`/`ReplayCubit` similar to `ReplaySubject`
- Dominant language
- Dart
- Stars
- 12.5k
- Forks
- 3.4k
- PR merge metrics
- No merged PRs in 30d
Description
**Description**
Please consider exposing a `List` from `ReplayBloc`/`ReplayCubit` similar to `ReplaySubject`. This would allow for easy access to previous `limit` 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 a `HydratedBloc` used in conjuncture with a `ReplayBloc` to initial state at any given point with `undoToIndex(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.
Contributor guide
Assessment
This issue has not been assessed yet.