Access common Bloc using BlocProvider in Flutter

Viewed 94

enter image description here

Hi,

I have the below scenario in my flutter app.

Screen flow: Screen 1 -> Screen 2 -> Screen 3 -> Screen 4 -> Screen 5

I have common bloc BlocCommon which I want to access only in Screen 3 and Screen 5. I don't want to make a global bloc provider and also I don't want to pass Bloc Provider in constructor from Screen 3 -> Screen 4 -> Screen 5 because I don't want Bloc to be accessible in Screen 4.

So what is the solution for this??

Thanks in advance.

0 Answers
Related