Is there better way to use multiple cubits on one screen
I initially created one Cubit to manage the state of my screen, but as it became too complex, I refactored it into four separate Cubits. Now, to make the screen function as intended, I had to implement communication between these Cubits using listeners and buidlwhen, which has resulted in messy and difficult-to-read code. Is there a better way to handle this?
Bloc Events not being executed sequentially
I have a piece of code where i need to call two bloc events sequentially the issue is that the first event is fired and api is called but the second is not being called , i tried to debug my code and i came to the conclusion that if i call both events from different blocs , they both get fired but if from the same bloc .. only the first gets fired , any help would be appreciate guys . Thank you
Flutter Bloc emit state NOT Triggering state change for BlocBuilder
My initial state set in my Bloc constructor super call WILL trigger the BlocBuilder, but no state changes after that will work. Yes, my state class is extending Equatable. I have gone through every topic on SO regarding bloc emit state not working and have checked everything. The only difference in this app as opposed to other apps I have bloc working, is that I have a Cubit and Bloc in this app, that should not matter I don’t think. Other than that for the life of me cannot figure out what is the problem here.
Re initialize Bloc
I have a bloc that i registered in multibloc provider in main.dart under mutiblocprovider.
This bloc provider have functions that i need to work inside its constructor.
BloC: Widget is not updating after a new state is emitted
On my “ProductScreen” I have a custom TextFiled which is declared like this