Repository: flutter
Issue: RouteSettings encoded name is automatically decoded in Flutter 3.13
Labels: c: regression,framework,f: routes,platform-web,has reproducible steps,P2,team-web,triaged-web,found in release: 3.13,found in release: 3.17

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

1. Run the above sample as web app with Flutter 3.7
2. Click on the "Navigate" button.
3. Observe the url in the browser. It will be like `http://localhost:53060/#/test?q=Hello%21`
4. Now Run the same sample with Flutter 3.13
5. Click on the "Navigate" button.
6. Observe the url in the browser. It will be like `http://localhost:53060/#/test?q=Hello!`
7. Note the difference in steps 3 and 7. Exclamation sign (!) is kept encoded in Flutter 3.7 but not in Flutter 3.13

### Expected results

Using Flutter 3.13, it should remain like `http://localhost:53060/#/test?q=Hello%21` as in Flutter 3.7

### Actual results

Exclamation sign is not encoded in Flutter 3.13

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        backgroundColor: Colors.transparent,
        body: Builder(
          builder: (context) {
            return Center(
              child: TextButton(
                  onPressed: () {
                    String name = "/test";
                    // append the query parameter
                    name += "?q=${Uri.encodeQueryComponent("Hello!")}";

                    Navigator.of(context).push(MaterialPageRoute(
                      settings: RouteSettings(name: name),
                      builder: (context) {
                        return Scaffold(
                          body: Container(
                            child: Center(
                              child: Text("Another route"),
                            ),
                          ),
                        );
                      },
                    ));
                  },
                  child: Text("Navigate")),
            );
          }
        ),
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>



</details>


### Logs

<details><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.13.6, on macOS 12.6.7 21G651 darwin-x64, locale
    en-US)
    • Flutter version 3.13.6 on channel stable at /Library/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ead455963c (6 weeks ago), 2023-09-26 18:28:17 -0700
    • Engine revision a794cf2681
    • Dart version 3.1.3
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/appleapple/Library/Android/sdk
    • Platform android-34, build-tools 30.0.3
    • ANDROID_HOME = /Users/appleapple/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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
      11.0.15+0-b2043.56-8887301)

[✓] IntelliJ IDEA Community Edition (version 2019.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • 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

[✓] VS Code (version 1.84.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.26.1

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 12.6.7 21G651 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 119.0.6045.105

[✓] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>