Relative Content

Tag Archive for flutterbloc

BlocProvider.of() called with a context that does not contain a BeneficiaryBloc

I have defined all my blocs and injects them using getIt, now I want to call this particular event BlocProvider.of(context).add(GetMerchantCategoryEvent()); in the initState immediately the page is launched but whenever I run the app, I am getting this error that says BlocProvider.of() called with a context that does not contain a BeneficiaryBloc.
Here is what I did

Blocs in a list

I have an instance of bloc A.
I want to create a list of blocs A so that each instance will contain different STATES depending on the current instance.