Repository: flutter
Issue: generateInitialRoute not called when url manually changed
Labels: framework,f: routes,platform-web,has reproducible steps,P2,found in release: 2.3,team-web,triaged-web

I run the app, the url is 'http://localhost:65486/#/home/' and onGenerateInitialRoutes is called.
Then I change the url to 'http://localhost:65486/#/home/a' for example.

Expected result:
onGenerateInitialRoutes is called
Actual result:
onGenerateInitialRoutes is not called

```
flutter doctor -v:
`C:\Users\Rony\AndroidStudioProjects\watoobi\watoobi>flutter doctor -v
[√] Flutter (Channel stable, 2.0.5, on Microsoft Windows [Version 10.0.19041.928], locale en-US)
    • Flutter version 2.0.5 at c:\flutter\flutter
    • Framework revision adc687823a (4 weeks ago), 2021-04-16 09:40:20 -0700
    • Engine revision b09f014e96
    • Dart version 2.12.3

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\Rony\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\Rony\AppData\Local\Android\sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] Connected device (3 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 10 (API 29) (emulator)
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 90.0.4430.93
    • Edge (web)                         • edge          • web-javascript • Microsoft Edge 90.0.818.56

• No issues found!`

code:

`
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  MyAppState createState() => MyAppState();
}

class MyAppState extends State<MyApp> {
  @override
  void dispose() {
    super.dispose();
  }

  @override
  void initState() {
    super.initState();
  }

// This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return getMaterialApp(context);
  }

  Widget getMaterialApp(BuildContext context) {
    return MaterialApp(
      onGenerateInitialRoutes: (url) {
        print('onGenerateInitialRoutes called');
        return [MaterialPageRoute(builder: (context) => MyHomePage(), settings: RouteSettings(name: url))];
      },
      onUnknownRoute: (settings) => MaterialPageRoute(builder: (context) => MyHomePage(), settings: RouteSettings(name: settings.name)),
      initialRoute: '/home',
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key}) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: SelectableText("test"),
      ),
    );
  }
}
`
```