title: how is the best way to manage session and navigation in flutter web
body: <p>I have 2 web pages on my proyect</p>
  
  <p><a href="https://i.stack.imgur.com/4NkG9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4NkG9.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/rn8zT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rn8zT.png" alt="enter image description here"></a></p>
  
  <p>I need to manage the user session. If the user is logged it appears the home page, and if the user is not logged it appears the login page.</p>
  
  <p>I am using a provider to check the state of the session</p>
  
  <pre><code>  @override
    Widget build(BuildContext context) {
      return Consumer&lt;LoginGeneralNotifier&gt;(
        builder: (context, appGenaralNotifier, _) {
          return appGenaralNotifier.getLogged()
              ? HomePage()
              : LoginPage();
        },
      );
    }
  }
  </code></pre>
  
  <p>The problem is that the url does not change after I am logged</p>