Repository: flutter
Issue: `PlatformMenuBar` application-level menu does not actually show the given `label` on macOS
Labels: framework,engine,platform-mac,a: desktop,has reproducible steps,P2,found in release: 3.0,found in release: 3.1,team-macos,triaged-macos

When creating a `PlatformMenuBar` for a macOS application, the provided `label` property does not actually influence the text of the application-level<sup>1</sup> menu - it will always be the name the application was created with, unless it is manually changed in the macos runner.

<sup>1</sup> application-level menu here means the menu that represents the application itself, where the name of the application is used, the very first menu in the menu bar:
<img width="229" alt="Screen Shot 2022-05-29 at 1 04 44 PM" src="https://user-images.githubusercontent.com/4250470/170882568-96f41b7a-a596-4193-aceb-d22455f4e8dc.png">

## Steps to Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->

1. Execute `flutter run` on the code sample **_on macOS_** <!-- (see "Code sample" section below) -->
2. Observe that the name of the application shown in the menu bar is not as expected
3. Change the `label` property of the application to something completely different, and observe that it has no effect on the name shown in the menu

**Expected results:** <!-- what did you want to see? -->
I expect to see the text that I provide to `label` shown in the menu bar: "PlatformMenuBar Bug", or whatever other text I provide

**Actual results:** <!-- what did you see? -->
The text "platform_menu_bar_bug" remains unchanged no matter what text is provided to `label`

<details>
<summary>Code sample</summary>

<!--
      Please create a minimal reproducible sample that shows the problem
      and attach it below between the lines with the backticks.

      To create it you can use `flutter create bug` command and update the `main.dart` file.

      Alternatively, you can use https://dartpad.dev/
      which is capable of creating and running small Flutter apps.

      Without this we will unlikely be able to progress on the issue, and because of that
      we regretfully will have to close it.
-->

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return PlatformMenuBar(
      menus: [
        PlatformMenu(
          label: 'PlatformMenuBar Bug',
          menus: [
            PlatformMenuItemGroup(
              members: <MenuItem>[
                PlatformMenuItem(
                  label: 'About',
                  onSelected: () {},
                )
              ],
            ),
          ],
        ),
      ],
      body: MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: const MyHomePage(title: 'Flutter Demo Home Page'),
      ),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ),
    );
  }
}
```

</details>

<details>
  <summary>Logs</summary>

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue.
-->

### `flutter run -d macos -v`
See [this pastebin](https://pastebin.com/CQRSb0aQ) for the log (GitHub wouldn't let me post with it, said the post was too long)

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

### `flutter analyze`
```
reubenturner@Reubens-MacBook-Pro-M1 platform_menu_bar_bug % flutter analyze
Analyzing platform_menu_bar_bug...                                      
No issues found! (ran in 1.2s)
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

### `flutter doctor -v`
```
reubenturner@Reubens-MacBook-Pro-M1 platform_menu_bar_bug % flutter doctor -v
[✓] Flutter (Channel stable, 3.0.1, on macOS 12.4 21F79 darwin-arm, locale en-US)
    • Flutter version 3.0.1 at /Users/reubenturner/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fb57da5f94 (10 days ago), 2022-05-19 15:50:29 -0700
    • Engine revision caaafc5604
    • Dart version 2.17.1
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/reubenturner/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • 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.10+0-b96-7281165)

[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 67.1.4
    • Dart plugin version 221.5591.58

[✓] VS Code (version 1.67.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.40.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 12.4 21F79 darwin-arm
    • Chrome (web)    • chrome • web-javascript • Google Chrome 101.0.4951.64

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
```

</details>


<!--
      Consider also attaching screenshots and/or videos to better
      illustrate the issue.

      You can upload them directly on GitHub.
      Beware that video file size is limited to 10MB.
-->