Repository: flutter
Issue: [go_router] WidgetApp default Page beeps on click (SystemSound.play(SystemSoundType.alert))
Labels: package,a: desktop,has reproducible steps,P2,p: go_router,found in release: 3.3,found in release: 3.7,team-go_router,triaged-go_router

## Description

Clicking anywhere on the screen beeps on macos. 

```dart 
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    // replacing it with MaterialApp.router does not beep
    return WidgetsApp.router(
      color: Colors.white,
      routerConfig: _router,
    );
  }
}

final _router = GoRouter(
  routes: [
    GoRoute(
      path: '/',
      builder: (context, state) => const Center(child: Text('Home Page')),
      // using `MaterialPage` explicitly does not beep
      // pageBuilder: (context, state) => const MaterialPage(child: Text('Home Page')),
    ),
  ],
);
```

This is caused by `go_router` creating [`NoTransitionPage`](https://github.com/flutter/packages/blob/9b153b249544ab36eda080dfb39b8d39656ca83c/packages/go_router/lib/src/pages/custom_transition_page.dart#L157) when using `WidgetsApp`.  https://github.com/flutter/packages/blob/9b153b249544ab36eda080dfb39b8d39656ca83c/packages/go_router/lib/src/builder.dart#L345

`NoTransitionPage` does not wrap the route in `ModalBarrier`, letting the clicks hit the `Navigators` `ModalBarrier` resulting in the `alert` https://github.com/flutter/flutter/blob/55584ad507170d9a96501e2b6fc7d3ff5578b517/packages/flutter/lib/src/widgets/modal_barrier.dart#L122

## Workaround
1. Use `MaterialApp.router`
2. Use `pageBuilder` instead of  `builder` for every Route and use a Page with a ModalBarrier. This is tedious because the pageBuilder can't be set for all routes at once https://github.com/flutter/flutter/issues/113282

## Expected fix

`NoTransitionPage` should wrap the page in `ModalBarrier`

## Version info

<details>
<summary>Details</summary>



```
go_router: 5.2.4
```

```
[!] Flutter (Channel beta, 3.7.0-1.1.pre, on macOS 13.0.1 22A400 darwin-arm64, locale en-DE)
    • Flutter version 3.7.0-1.1.pre on channel beta at /Users/pascalwelsch/Projects/smars-frontend/.flutter
    ! Warning: `flutter` on your path resolves to /opt/homebrew/Caskroom/flutter/3.0.4/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/pascalwelsch/Projects/smars-frontend/.flutter. Consider adding
      /Users/pascalwelsch/Projects/smars-frontend/.flutter/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart@2.17/2.17.7/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/pascalwelsch/Projects/smars-frontend/.flutter. Consider adding
      /Users/pascalwelsch/Projects/smars-frontend/.flutter/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision e599f02c7a (12 days ago), 2022-12-08 01:07:24 +0530
    • Engine revision 4971c5b2e7
    • Dart version 2.19.0 (build 2.19.0-444.1.beta)
    • DevTools version 2.20.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/pascalwelsch/Library/Android/sdk
    • Platform android-33, build-tools 32.0.0
    • Java binary at: /Users/pascalwelsch/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • 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 2021.3)
    • Android Studio at /Users/pascalwelsch/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9014738/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.13+0-b1751.21-8125866)

[✓] Android Studio (version 2021.3)
    • Android Studio at /Users/pascalwelsch/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/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.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.3)
    • IntelliJ at /Users/pascalwelsch/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 71.1.6
    • Dart plugin version 223.7571.203

[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.3)
    • IntelliJ at /Users/pascalwelsch/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-1/213.7172.25/IntelliJ IDEA.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

[✓] IntelliJ IDEA Ultimate Edition (version 2022.3)
    • IntelliJ at /Users/pascalwelsch/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/223.7571.182/IntelliJ IDEA.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

[✓] IntelliJ IDEA Ultimate Edition (version 2022.2.3)
    • IntelliJ at /Users/pascalwelsch/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/222.4345.14/IntelliJ IDEA.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.74.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.54.0

[✓] Connected device (3 available)
    • Pascal’s iPhone XR (mobile) • 00008020-000D0C34263B002E • ios            • iOS 15.6.1 19G82
    • macOS (desktop)             • macos                     • darwin-arm64   • macOS 13.0.1 22A400 darwin-arm64
    • Chrome (web)                • chrome                    • web-javascript • Google Chrome 108.0.5359.124

[✓] HTTP Host Availability
    • All required HTTP hosts are available
```


</details>