title: How to re-trigger initial event in Bloc instead using initState?
body: <p>Here's the thing, I use get_it as dependency injection, and so I have the code:</p>
  <pre><code>final sl = GetIt.instance;
  
  Future&lt;void&gt; init() async {
  
    sl.registerFactory(
      () =&gt; ABloc(
        services: sl(),
      ),
    );
  
    [...]
  
  }
  </code></pre>
  <hr />
  <pre><code>class MyApp extends StatefulWidget {
    const MyApp({Key? key}) : super(key: key);
  
    @override
    _MyAppState createState() =&gt; _MyAppState();
  }
  
  class _MyAppState extends State&lt;MyApp&gt; {
  
    @override
    void initState() {
      super.initState();
  
      [...]
    }
  
    @override
    Widget build(BuildContext context) {
      return MultiBlocProvider(
        providers: [
          [...]
          BlocProvider&lt;ABloc&gt;(
            create: (context) =&gt;
                di.sl&lt;ABloc&gt;()..add(GetAInformation()), // trigger the event
          ),
        ],
        child: MaterialApp...
     );
    }
  }
  </code></pre>
  <p>When I enter from the first screen (ScreenLogin), to my screen that has the information (ScreenInfo), enter to Bloc and gets the informacion, however when I return to my screen (ScreenLogin) simulating a &quot;LogOut&quot; with pushNamedAndRemoveUntil, and return again no longer enters to the Bloc and trigger the event, I would like to know what I'm doing wrong or how I do to re-trigger the event again.</p>
  <pre><code>class ScreenInfo extends StatelessWidget{
  
  
    // @override
    // void initState() {
    //   super.initState();
    //   BlocProvider.of&lt;ABloc&gt;(context).add(const GetAInformation());
    // }
  
  
    @override
    Widget build(BuildContext context) {
      return WillPopScope(
          onWillPop: () async {
            Navigator.of(context).pushNamedAndRemoveUntil(
              PageNames.screenLogin,
              (Route&lt;dynamic&gt; route) =&gt; false,
            },
            return false;
          },
          child: Scaffold(
            body: SafeArea(
              child: Padding(
                padding: const EdgeInsets.all(10),
                child: Column(
                  children: &lt;Widget&gt;[
                 
                    // BLOC
                    BlocBuilder&lt;ABloc, AState&gt;(
                      builder: (context, state) {
                        switch (state.status) {
                          case ProjectListStatus.success:
                            return Text(state);
                          case ProjectListStatus.failure:
                            return Text(state);
  
                          default:
                            return const LoadingWidget();
                        }
                      },
                    ),
                  ],
                ),
              ),
            ),
      );
    }
  }
  </code></pre>
  <p>PS : I use to enter ScreenInfo a pushReplacementNamed</p>