title: Multi bloc builder
body: <p>here is the situation -</p>
  <p>my flutter app dashboard screen has two separate list</p>
  <ol>
  <li>pageView on top and</li>
  <li>List item</li>
  </ol>
  <p><a href="https://i.stack.imgur.com/k0TPN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k0TPN.png" alt="enter image description here" /></a></p>
  <p>i have a bloc named dashboard_bloc and dashboard_event with two separate event to get pageView data and list item data respectively and dashboard_state as well.</p>
  <p>this is how i started.</p>
  <pre><code>    void initState() {
      // TODO: implement initState
      super.initState();
      _dashboardBloc = DashboardBloc(repository: ProductRepositoryImpl());
      _dashboardBloc.add(FetchHomeProductsEvent(token: token, productId: &quot;1&quot;));
      _dashboardBloc.add(FetchProductsEvent(token: token));
    }
  
      Widget build(BuildContext context) {
      return Scaffold(
        body: BlocProvider(
          create: (context) =&gt; _dashboardBloc,
          child: SingleChildScrollView(
            child: Column(
              children: &lt;Widget&gt;[
                Container(
                  child: BlocBuilder&lt;DashboardBloc, DashboardState&gt;(
                      bloc: _dashboardBloc,
                      builder: (context, state) {
                        if (state is DashboardLoadingState) {
                          return buildLoading();
                        } else if (state is DashboardErrorState) {
                          return buildErrorUi(state.message);
                        } else if (state is DashboardLoadedState) {
                          return buildProdctsList(state.products, context);
                        } else {
                          return Container();
                        }
                      }),
                ),
                Container(
                  child: BlocBuilder&lt;DashboardBloc, DashboardState&gt;(
                      
                      bloc: _dashboardBloc,
                      builder: (context, state) {
                        if (state is DashboardProductState) {
                          return Text(state.products.name);
                        } else if (state is DashboardErrorState) {
                          return buildErrorUi(state.message);
                        } else {
                          return Container();
                        }
                      }),
                ),
              ],
            ),
          ),
        ),
      );
    }
  </code></pre>
  <p>this is bloc transition log -</p>
  <pre><code>I/flutter (  877): Transition { currentState:DashboardStateInitialState, event: FetchHomeProductsEvent,
          nextState: DashboardProductState }
  I/flutter (  877): Transition { currentState: DashboardProductState, event: FetchProductsEvent, nextState:
          DashboardLoadingState }
  I/flutter (  877): Transition { currentState: DashboardLoadingState, event: FetchProductsEvent, nextState:
          DashboardLoadedState }
  </code></pre>
  <p>problem here is that i am not able to render state of FetchHomeProductsEvent. it only renders state of FetchProductsEvent.</p>
  <p>How can i handle both event using multiple bloc builder.
  Any help will be much appreciated.</p>