I have two cubits and states => DeviceBloc, DeviceScreen and StatisticsCubit, StatisticsState.
And I want to use all of them in one page(bloc consumer). How can I do this?
This is my code, I want to add StatisticsCubit, StatisticsState inside BlocCinsumer
return BlocConsumer<DeviceScreenBloc, DeviceScreenState>(listener: (context, state) async {}
2
Answers
You could wrap a
BlocConsumer
in anotherBlocConsumer
like so:Just nest the bloc builder method and create the proper implementations.
}