title: Build the architecture for a Flutter App with flutter_bloc
body: <p>I have to develop a simple app with Flutter and I am trying for the first time the bloc pattern. I am using <code>flutter_bloc</code> package but I have two main problems and got stuck:</p>
  
  <ol>
  <li><p>All the screens in the app have blocs that depends on repos to make requests to a server, and for each request I need a token. I obtain the token at the <code>authentication_bloc</code> (login), but I can't share that token to all the blocs unless I make them dependent on auth_bloc (the bloc who has the user model storing the token). For a simple app, maybe it works but if other bloc has more bloc dependencies besides the auth_bloc, it could become a mess injecting all the blocs as dependencies. What alternative could be a good solution?</p></li>
  <li><p>For the navigation I have a <code>bloc</code> for bottom navigation bar. But I want to all the screens on tabs can call the <code>change_tab()</code> function at bottom bar bloc. And again is the same problem, I only can add events at bottom bar bloc if the other blocs have a dependency on bottom bar bloc. I dont want to add the auth bloc and the bottom bar bloc as dependencies on all the blocs that manages all the screens.</p></li>
  </ol>
  
  <p>I appreciate advices, alternatives or documentation where I can learn to build a good architecture for apps a bit more complex than the examples showed <a href="https://bloclibrary.dev/#/gettingstarted" rel="nofollow noreferrer">here</a></p>