title: BlocBuilder() not being updated after BLoC yielding new state
body: <p>I am new to the BLoC pattern on flutter and i'm trying to rebuild a messy flutter app using it. Currently, I intend to get a list of user's apps and display them with a ListView.builder(). The problem is that whenever the state of my AppsBloc changes, my StatelessWidget doesn't update to show the new state. I have tried:</p>
  
  <ul>
  <li>Using MultiBlocProvider() from the main.dart instead of nesting this appsBloc inside a themeBloc that contains the whole app</li>
  <li>Returning a list instead of a Map, even if my aux method returns a correct map</li>
  <li>Using a StatefulWidget, using the BlocProvider() only on the ListView...</li>
  </ul>
  
  <p>I have been reading about this problem on similar projects and the problem might be with the Equatable. However, I haven't been able to identify any error on that since I'm also new using Equatable. I have been debugging the project on VScode with a breakpoint on the yield* line, and it seems to be okay. In spite of that the widget doesn't get rebuilt: it keeps displaying the textcorresponding to the InitialState.</p>
  
  <p>Moreover, the BLoC doesn't print anything on console even though all the states have an overwritten toString()</p>
  
  <p>These are my 3 BLoC files:</p>
  
  <p>apps_bloc.dart</p>
  
  <pre><code>import 'dart:async';
  
  import 'package:bloc/bloc.dart';
  import 'package:device_apps/device_apps.dart';
  import 'package:equatable/equatable.dart';
  
  part 'apps_event.dart';
  part 'apps_state.dart';
  
  class AppsBloc extends Bloc&lt;AppsEvent, AppsState&gt; {
    @override
    AppsState get initialState =&gt; AppsInitial();
  
    @override
    Stream&lt;AppsState&gt; mapEventToState(AppsEvent event) async* {
      yield AppsLoadInProgress();
      if (event is AppsLoadRequest) {
        yield* _mapAppsLoadSuccessToState();
        }
    }
  
    Stream&lt;AppsState&gt; _mapAppsLoadSuccessToState() async* {
      try {
        final allApps = await DeviceApps.getInstalledApplications(
            onlyAppsWithLaunchIntent: true, includeSystemApps: true);
  
        final listaApps = allApps
          ..sort((a, b) =&gt;
              a.appName.toLowerCase().compareTo(b.appName.toLowerCase()));
  
        final Map&lt;Application, bool&gt; res =
            Map.fromIterable(listaApps, value: (e) =&gt; false);
  
        yield AppsLoadSuccess(res);
      } catch (_) {
        yield AppsLoadFailure();
      }
    }
  }
  </code></pre>
  
  <p>apps_event.dart</p>
  
  <pre><code>part of 'apps_bloc.dart';
  
  abstract class AppsEvent extends Equatable {
    const AppsEvent();
  
    @override
    List&lt;Object&gt; get props =&gt; [];
  }
  
  class AppsLoadRequest extends AppsEvent {}
  
  </code></pre>
  
  <p>apps_state.dart</p>
  
  <pre><code>part of 'apps_bloc.dart';
  
  abstract class AppsState extends Equatable {
    const AppsState();
  
    @override
    List&lt;Object&gt; get props =&gt; [];
  }
  
  class AppsInitial extends AppsState {
    @override
    String toString() =&gt; "State: AppInitial";
  }
  
  class AppsLoadInProgress extends AppsState {
    @override
    String toString() =&gt; "State: AppLoadInProgress";
  }
  
  class AppsLoadSuccess extends AppsState {
    final Map&lt;Application, bool&gt; allApps;
    const AppsLoadSuccess(this.allApps);
  
    @override
    List&lt;Object&gt; get props =&gt; [allApps];
  
    @override
    String toString() =&gt; "State: AppLoadSuccess, ${allApps.length} entries";
  }
  
  class AppsLoadFailure extends AppsState {
    @override
    String toString() =&gt; "State: AppLoadFailure";
  }
  
  </code></pre>
  
  <p>main_screen.dart</p>
  
  <pre><code>class MainScreen extends StatelessWidget {
    const MainScreen({Key key}) : super(key: key);
  
    @override
    Widget build(BuildContext context) {
      return TabBarView(
          children: &lt;Widget&gt;[
            HomeScreen(),
            BlocProvider(
              create: (BuildContext context) =&gt; AppsBloc(),
              child: AppsScreen(),
            )
            ,
          ],
        );
    }
  }
  </code></pre>
  
  <p>apps_screen.dart</p>
  
  <pre><code>class AppsScreen extends StatelessWidget {
    const AppsScreen({Key key}) : super(key: key);
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
            body: Container(
            margin: EdgeInsets.fromLTRB(30, 5, 10, 0),
            child: Column(children: &lt;Widget&gt;[
              Row(
                children: &lt;Widget&gt;[
                  Text("Apps"),
                ],
              ),
              Row(children: &lt;Widget&gt;[
                Container(
                  width: MediaQuery.of(context).size.width - 50,
                  height: MediaQuery.of(context).size.height - 150,
                  child: BlocBuilder&lt;AppsBloc, AppsState&gt;(
                    builder: (BuildContext context, AppsState state) {
                      if (state is AppsLoadSuccess)
                        return Text("LOADED");
                      else if (state is AppsInitial)
                        return GestureDetector(
                            onTap: () =&gt; AppsBloc().add(AppsLoadRequest()),
                            child: Text("INITIAL"));
                      else if (state is AppsLoadInProgress)
                        return Text("LOADING...");
                      else if (state is AppsLoadFailure)
                        return Text("LOADING FAILED");
                    },
                  ),
                ),
              ])
            ])),
      );
    }
  }
  </code></pre>