felangel / bloc

A predictable state management library that helps implement the BLoC design pattern

Home Page:https://bloclibrary.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docs: replay bloc with multi bloc

onism0106 opened this issue · comments

Hello, thank you very much for this library first.

I am currently migrating my project to Bloc. During this process, I encountered an issue regarding replay.

Following clean architecture principles, I have divided my application into multiple blocs. My application is a large desktop application that requires redo and undo functionality. For example, a certain page has two sub-modules, A and B, each with their respective blocs, blocA and blocB. The user performs actions such as adding an event in blocA and another in blocB. My undo and redo functionality need to listen to the entire page's blocs rather than specific ones. For instance, when the user presses cmd Z, I need to undo blocB events followed by blocA events in the order of the user's actions, rather than undoing events for a specific bloc. How can I implement this?

Thank you very much.