title: Use Future with MaterialApp.router in main.dart
body: <p><strong>SITUATION:</strong> I'm trying to set up firebase with my flutter project by following this <a href="https://youtu.be/EXp0gq9kGxI?t=909" rel="nofollow noreferrer">guide by the firebase team.</a></p>
  <p><strong>PROBLEM:</strong> In the final steps of the guide, a FutureBuilder widget is passed to the 'home' property of a MaterialApp widget. However, MaterialApp.router does not have a 'home' property, so I am struggling to complete the set-up (am new to flutter :-)).</p>
  <p>Any thoughts on how to solve this problem?</p>
  <pre><code>// Import libraries
  import 'package:flutter/material.dart';
  import 'package:go_router/go_router.dart';
  import 'package:firebase_core/firebase_core.dart';
  
  // Import custom widgets
  import 'views/landing_page.dart';
  import 'views/info_page.dart';
  
  
  // Initiate the app
  Future&lt;void&gt; main() async {
    // Ensure all services are loaded before app is started
    WidgetsFlutterBinding.ensureInitialized();
    // Run the app
    runApp(MyApp());
  }
  
  
  // Define the MyApp widget
  class MyApp extends StatelessWidget {
    MyApp({Key? key}) : super(key: key);
  
    final Future&lt;FirebaseApp&gt; _fbApp = Firebase.initializeApp();
  
    // Build the website
    @override
    Widget build(BuildContext context) {
      return MaterialApp.router(
        routeInformationParser: _router.routeInformationParser,
        routerDelegate: _router.routerDelegate,
        debugShowCheckedModeBanner: false,
      );
    }
  
    // Declare routing information
    final _router = GoRouter(
      routes: [
        GoRoute(
          path: '/',
          builder: (context, state) =&gt; const LandingPage(),
        ),
        GoRoute(
          path: '/info',
          builder: (context, state) =&gt; const InfoPage(),
        ),
      ],
    );
  }
  </code></pre>