Is there a way to maintain a global bloc that stores all the remaining bloc states information

16 Views Asked by At

For my flutter project, iam dealing with multiple blocs each bloc have its own api data in its state, can i maintain a single bloc like a global thing, that contains all my states, apart from my individual blocs that gets triggered based on their initializations, and i want a global bloc that will collect all the states and gets notified whenever there is state change in any of the blocs.

can someone please help me with this, i am aware that we can use multibloc providers and can build my various parts of ui with bloc builders, but i want to achieve a global bloc, so that i can wrap my ui with the main global bloc, and initilize the remaining blocs from a page.

I had tried multibloc providers to use multiple blocs in projects and builds the ui components with respective blocs, but i want to achieve a global bloc that holds all the states information and should get notified whenever there is state change.

0

There are 0 best solutions below