title: Redirect user to login form if the user is not logged in
body: <p>I made a web app and deployed it to firebase. Let's say that the link is <code>https://firebasewebapp</code>. When I open the link the <code>Sign In</code> form shows up but when I open <code>https://firebasewebapp/#/home</code> I get redirected to the <code>home page</code> even if the user is not logged in. Is there a way to redirect the user if it's not <code>logged in</code>? I use <code>Flutter 2.10.3 Stable Channel</code></p>
  <pre><code>Future&lt;void&gt; main() async {
    WidgetsFlutterBinding.ensureInitialized();
    await Firebase.initializeApp(
      options: options),
    );
    runApp(MultiProvider(providers: [
    ], child: const MyApp()));
  }
  
  
  class MyApp extends StatelessWidget {
    const MyApp({Key? key}) : super(key: key);
  
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        title: 'Portalul e-Radauti',
        theme: ThemeData(
          primarySwatch: Colors.orange,
          textButtonTheme: TextButtonThemeData(
            style: ButtonStyle(
              backgroundColor:
                  MaterialStateColor.resolveWith((states) =&gt; Colors.orange),
              foregroundColor:
                  MaterialStateColor.resolveWith((states) =&gt; Colors.white),
            ),
          ),
        ),
        initialRoute: '/login',
        routes: {
          '/home': (_) =&gt; const MyHomePage(),
          '/addcouncilmember': (_) =&gt; const LocalCouncilLayout(),
          '/signup': (_) =&gt; const SignUp(),
          '/login': (_) =&gt; const LogIn(),
          '/addevent': (_) =&gt; const AddEventLayout(),
          '/profile': (_) =&gt; const Profile(),
        },
        //   home: const MyApp(),
      );
    }
  }
  </code></pre>