title: Flutter Web-Proper way to use both of onGenerateRoute and routes as properties of MaterialApp
body: <p>I have a browser link of reset password that sent by email<code>(http://trialxx.id/#/auth?email=trial@email.com )</code>, so whenever user click that link I would like to navigate them to ResetPasswordScreen. So far I have been declaring the route inside <code>onGenerateRoute</code>, here is the code</p>
  <pre><code>Route&lt;dynamic&gt; generateRoute(RouteSettings settings) {
      final settingsUri = Uri.parse(settings.name);
      final postID = settingsUri.queryParameters['email'];
      const start = &quot;#/&quot;;
      const end = &quot;?&quot;;
      final startIndex = settings.name.indexOf(start);
      final endIndex = settings.name.indexOf(end, startIndex + start.length);
      if (settings.name.substring(startIndex + start.length, endIndex) ==
              &quot;auth&quot; &amp;&amp;
          postID != null &amp;&amp;
          postID != &quot;&quot;) {
        return MaterialPageRoute(
            builder: (context) =&gt; RisetPasswordScreen(email: settings.name),
            settings: RouteSettings(
                name: '/${settings.name.substring(startIndex + start.length)}'));
      }
      else {
        return MaterialPageRoute(builder: (context) =&gt; FirstScreen());
      }
    }
  </code></pre>
  <p>but, I didn't able to define it inside <code>routes</code> property, here is the way I define the route</p>
  <pre><code>MaterialApp(
  debugShowCheckedModeBanner: false,
        onGenerateRoute: generateRoute,
        title: 'e-Recruitment',
        initialRoute: '/',
        routes: {
        if (Uri.base.queryParameters['email'] != null &amp;&amp;
              Uri.base.queryParameters['email'] != &quot;&quot;)
            if (Uri.base.toString().substring(
                    Uri.base.toString().indexOf(&quot;#/&quot;) + 2,
                    Uri.base
                        .toString()
                        .indexOf(&quot;?&quot;, Uri.base.toString().indexOf(&quot;#/&quot;) + 2)) ==
                &quot;auth&quot;)
              '/auth': (context) =&gt; RisetPasswordScreen()
            else
              '/home': (context) =&gt; FirstScreen(),
        '/': (context) =&gt; AnotherPage(),
        '/second': (context) =&gt; SecondPage(),
        })
  </code></pre>
  <p>so am I doing wrong or is there a proper way to define the routes of <code>/auth?email=trial@email.com</code> inside routes property?</p>