title: BlocBuilder changes the state, but does not change the text on the screen
body: <p>I have the following problem:
  I made a mini-app on the BLoC architecture.
  But I do not change the text on the screen.</p>
  <p>I also made similar screens and they worked, maybe I just missed something, but I checked with the official documentation and it seems like everything should work.</p>
  <p>Flutter Version-1.22.5</p>
  <p>Version of Bloc and Flutter Bloc - 6.1.0</p>
  <p>Who can tell you what the problem is?</p>
  <p>Here is the app code:</p>
  <p>main.dart</p>
  <pre><code>import 'package:flutter/material.dart';
  import 'package:flutter_bloc/flutter_bloc.dart';
  
  import 'bloc/hello_bloc.dart';
  
  void main() {
    runApp(MyApp());
  }
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
          visualDensity: VisualDensity.adaptivePlatformDensity,
        ),
        home: Scaffold(body: MyHomePage()),
      );
    }
  }
  
  class MyHomePage extends StatefulWidget {
    @override
    _MyHomePageState createState() =&gt; _MyHomePageState();
  }
  
  class _MyHomePageState extends State&lt;MyHomePage&gt; {
    final HelloBloc helloBloc = HelloBloc();
  
    @override
    Widget build(BuildContext context) {
      return BlocProvider(
        create: (context) =&gt; HelloBloc(),
        child: BlocBuilder&lt;HelloBloc, HelloState&gt;(builder: (context, state) {
          if (state is HelloPrinted) {
            return Center(
              child: Row(
                children: [
                  Text(&quot;Hello&quot;),
                  TextButton(
                      onPressed: () {
                        helloBloc.add(PrintBloc());
                      },
                      child: Text(&quot;Print Bloc&quot;))
                ],
              ),
            );
          }
          if (state is BlocPrinted) {
            return Center(
              child: Row(
                children: [
                  Text(&quot;Bloc&quot;),
                  TextButton(
                      onPressed: () {
                        helloBloc.add(PrintHello());
                      },
                      child: Text(&quot;Print hello&quot;))
                ],
              ),
            );
          } else {
            return Center(
              child: Row(
                children: [
                  Text(&quot;Start print hello first&quot;),
                  TextButton(
                      onPressed: () {
                        helloBloc.add(PrintHello());
                      },
                      child: Text(&quot;Print hello&quot;))
                ],
              ),
            );
          }
        }),
      );
    }
  }
  
  </code></pre>
  <p>hello_bloc.dart</p>
  <pre><code>import 'dart:async';
  
  import 'package:bloc/bloc.dart';
  import 'package:meta/meta.dart';
  
  part 'hello_event.dart';
  part 'hello_state.dart';
  
  class HelloBloc extends Bloc&lt;HelloEvent, HelloState&gt; {
    HelloBloc() : super(HelloInitial());
  
    @override
    void onTransition(Transition&lt;HelloEvent, HelloState&gt; transition) {
      print(transition);
      super.onTransition(transition);
    }
  
    @override
    Stream&lt;HelloState&gt; mapEventToState(
      HelloEvent event,
    ) async* {
      if (event is PrintHello) {
        await Future&lt;void&gt;.delayed(const Duration(seconds: 1));
        yield HelloPrinted();
      }
      if (event is PrintBloc) {
        await Future&lt;void&gt;.delayed(const Duration(seconds: 1));
        yield BlocPrinted();
      }
    }
  }
  
  </code></pre>
  <p>hello_event.dart</p>
  <pre><code>part of 'hello_bloc.dart';
  
  @immutable
  abstract class HelloEvent {}
  
  class PrintHello extends HelloEvent {}
  
  class PrintBloc extends HelloEvent {}
  
  </code></pre>
  <p>hello_state.dart</p>
  <pre><code>part of 'hello_bloc.dart';
  
  @immutable
  abstract class HelloState {}
  
  class HelloInitial extends HelloState {}
  
  class HelloPrinted extends HelloState {}
  
  class BlocPrinted extends HelloState {}
  
  </code></pre>
  <p>Thank you all in advance for your answers.</p>