title: App not managing state as expected after signing out
body: <p>I have the following main():</p>
  <pre><code>Future main() async {
    WidgetsFlutterBinding.ensureInitialized();
    await Firebase.initializeApp();
    final authBloc = AuthBloc();
    final otroUsuarioBloc = OtroUsuarioBloc();
    final firestoreService = FirestoreService();
  
    FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterError;
  
    runApp(
      EasyLocalization(
          supportedLocales: [
            Locale('en', 'US'),
            Locale('es', 'ES'),
            Locale('de', 'DE'),
            Locale('fr', 'FR')
          ],
          path: 'assets/lang', // &lt;-- change patch to your
          fallbackLocale: Locale('es', 'ES'),
          child: MultiProvider(
              providers: [
                ChangeNotifierProvider(create: (_) =&gt; PostsProvider()),
                ChangeNotifierProvider(create: (_) =&gt; FuegosPostsProvider()),
                ChangeNotifierProvider(create: (_) =&gt; ComentariosPostsProvider()),
                ChangeNotifierProvider(create: (_) =&gt; UsuarioProvider()),
                ChangeNotifierProvider(create: (_) =&gt; VisitasSpotProvider()),
                ChangeNotifierProvider(create: (_) =&gt; CheckInSpotProvider()),
                ChangeNotifierProvider(create: (_) =&gt; UserSportsProvider()),
                ChangeNotifierProvider(create: (_) =&gt; SeguidoresProvider()),
                ChangeNotifierProvider(create: (_) =&gt; UsuarioActualProvider()),
                ChangeNotifierProvider(create: (_) =&gt; AmigosProvider()),
                ChangeNotifierProvider(create: (_) =&gt; MensajesChatProvider()),
                ChangeNotifierProvider(create: (_) =&gt; SpotsProvider()),
                ChangeNotifierProvider(
                    create: (_) =&gt; EntradasSalidasSpotProvider()),
                ChangeNotifierProvider(create: (_) =&gt; UsuarioSharedProvider()),
                ChangeNotifierProvider(create: (_) =&gt; DatosUsuarioProvider()),
                ChangeNotifierProvider(create: (_) =&gt; LogeadoProvider()),
                Provider(create: (context) =&gt; authBloc),
                Provider(create: (context) =&gt; otroUsuarioBloc),
              ],
              child: MaterialApp(
                  title: &quot;Mov-Map&quot;,
                  home: MyApp(),
                  onGenerateRoute: Routes.materialRoutes,
                  theme: ThemeData(scaffoldBackgroundColor: Colors.white)))),
    );
  }
  </code></pre>
  <p>And also the following MyApp():</p>
  <pre><code>class MyApp extends StatefulWidget {
    @override
    _MyAppState createState() =&gt; _MyAppState();
  }
  
  class _MyAppState extends State&lt;MyApp&gt; {
    @override
    void initState() {
      // TODO: implement initState
      super.initState();
    }
  
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
          debugShowCheckedModeBanner: false,
          localizationsDelegates: context.localizationDelegates,
          supportedLocales: context.supportedLocales,
          locale: context.locale,
          home: SplashScreen()); // define it once at root level.
    }
  }
  
  class SplashScreen extends StatefulWidget {
    @override
    State&lt;StatefulWidget&gt; createState() {
      return SplashScreenState();
    }
  }
  
  class SplashScreenState extends State&lt;SplashScreen&gt; {
    //INICIALIZAMOS LAS VARIABLES DE LA INFO QUE NOS DA EL PACKAGE GET_VERSION
    String _platformVersion = 'Unknown';
    String _projectVersion = '';
    String _projectCode = '';
    String _projectAppID = '';
    String _projectName = '';
    bool logeado = false;
    String uuid = &quot;&quot;;
  
    @override
    void initState() {
      super.initState();
  
      initPlatformState(); //#0004
  
      Future.delayed(Duration(seconds: 6), () {
        //#005
        Navigator.push(
            context,
            MaterialPageRoute(
              builder: (context) =&gt; App(), //#0006
            ));
      });
    }
  </code></pre>
  <p>Followed by App():</p>
  <pre><code>class App extends StatefulWidget {
    @override
    _AppState createState() =&gt; _AppState();
  }
  
  class _AppState extends State&lt;App&gt; {
    String uuid = &quot;&quot;;
  
    @override
    void initState() {
      super.initState();
      uuid = CheckLogin().userData();
  
      NotificationService.instance.start(); //#0012
    }
  
    @override
    Widget build(BuildContext context) {
      return uuid != null ? MyNavigationBar() : Login();
    }
  
    @override
    void dispose() {
      super.dispose();
    }
  }
  </code></pre>
  <p>And here you have CheckLogin():</p>
  <pre><code>class CheckLogin{
    final FirebaseAuth auth = FirebaseAuth.instance;
  
    String userData() {
      final User user = auth.currentUser;
      if (user !=null){
        final uid = user.uid;
        return uid;
      }
      else {
       return null;
      }
  
      ;
    }
  }
  </code></pre>
  <p>And now you have Login():</p>
  <pre><code>class Login extends StatefulWidget {
    @override
    _LoginState createState() =&gt; _LoginState();
  }
  
  class _LoginState extends State&lt;Login&gt; {
  
  
    @override
    void initState() {
  
      super.initState();
    }
  
    @override
    void dispose() {
      
      super.dispose();
    }
  
    @override
    Widget build(BuildContext context) {
  
      final authBloc = Provider.of&lt;AuthBloc&gt;(context, listen: false);
  
  
  
      return Scaffold(
          body: ListView(
            padding: EdgeInsets.only(top: 15.0),
            children: &lt;Widget&gt;[
  
              Container(
                height: MediaQuery.of(context).size.height * 0,
                decoration: BoxDecoration(
                    image: DecorationImage(
                        image: AssetImage('assets/images/top_bg.png'),
                        fit: BoxFit.fill)),
              ),
              Container(
                height: 180.0,
                decoration: BoxDecoration(
                  image: DecorationImage(
                      image: AssetImage('assets/images/app_icon_trans.png')),
                ),
              ),
              StreamBuilder&lt;String&gt;(
                  stream: authBloc.email,
                  builder: (context, snapshot) {
                    return AppTextField(
                      isIOS: Platform.isIOS,
                      hintText: &quot;email&quot;.tr(),
                      cupertinoIcon: CupertinoIcons.mail_solid,
                      materialIcon: Icons.email,
                      textInputType: TextInputType.emailAddress,
                      errorText: snapshot.error,
                      onChanged: authBloc.changeEmail,
                    );
                  }),
              StreamBuilder&lt;String&gt;(
                  stream: authBloc.password,
                  builder: (context, snapshot) {
                    return AppTextField(
                      isIOS: Platform.isIOS,
                      hintText: &quot;password&quot;.tr(),
                      cupertinoIcon: IconData(0xf4c9,
                          fontFamily: CupertinoIcons.iconFont,
                          fontPackage: CupertinoIcons.iconFontPackage),
                      materialIcon: Icons.lock,
                      obscureText: true,
                      errorText: snapshot.error,
                      onChanged: authBloc.changePassword,
                    );
                  }),
              StreamBuilder&lt;bool&gt;(
                  stream: authBloc.isValid,
                  builder: (context, snapshot) {
                    return AppButton(
                      buttonText: &quot;login&quot;.tr(),
                      buttonType: (snapshot.data == true)
                          ? ButtonType.LightBlue
                          : ButtonType.Disabled,
                      onPressed: authBloc.loginEmail,
                    );
                  }),
              SizedBox(
                height: 6.0,
              ),
              Center(
                child: Text(&quot;o&quot;.tr(), style: TextStyles.suggestion),
              ),
              SizedBox(
                height: 6.0,
              ),
              Padding(
                padding: BaseStyles.listPadding,
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: &lt;Widget&gt;[
  
  
                    AppSocialButton(
                      socialType: SocialType.Google,
                      onPressed: authBloc.signinGoogle,
                    ),
  
                  ],
                ),
              ),
              Padding(
                padding: BaseStyles.listPadding,
                child: RichText(
                    textAlign: TextAlign.center,
                    text: TextSpan(
                        text: &quot;nuevo&quot;.tr(),
                        style: TextStyles.body,
                        children: [
                          TextSpan(
                              text: &quot;createaccount&quot;.tr(),
                              style: TextStyles.link,
                              recognizer: TapGestureRecognizer()
                                ..onTap =
                                    () =&gt; Navigator.pushNamed(context, '/signup'))
                        ])),
              ),
  
            ],
          ),
        );
      }
    }
  </code></pre>
  <p>When the user starts the app the first time, after the SplashScreen the app shows Login().</p>
  <p>Then when the user makes the login, the app shows MyNavigationBar().</p>
  <p>This part of the app is working fine. If the user closes the app, on the next start the app opens the SplashScreen and then MyNavigationBar(), as expected.</p>
  <p>The issue I have is during the sign out procedure. There is a button to signout:</p>
  <pre><code>onTap: () async {
                      await _auth.signOut();
  
                      Navigator.pushAndRemoveUntil(
                          context,
                          MaterialPageRoute(builder: (context) =&gt; Login()),
                          (route) =&gt; false);
                    }
  </code></pre>
  <p>When the user taps on the button, the app shows Login(), but after making the login again, the app stays in login, only when making a new run of the app (using Run app from Android Studio without closing the app) then the app shows the SplashScreen again and then opens  MyNavigationBar().</p>
  <p>I guess there is a problem on some part of the code managing the state that is not working fine.</p>