Add macosPrefix to the pubspec schema for plugins (#33287)

Adds a new macosPrefix, which serves the same purpose as iosPrefix but
for macOS plugins.

It is not yet used by the tooling, but this allows for plugins to start
to be written using it in preparation for tooling support for plugins.

Part of #32718
diff --git a/packages/flutter_tools/lib/src/flutter_manifest.dart b/packages/flutter_tools/lib/src/flutter_manifest.dart
index a757486..6a23999 100644
--- a/packages/flutter_tools/lib/src/flutter_manifest.dart
+++ b/packages/flutter_tools/lib/src/flutter_manifest.dart
@@ -371,7 +371,10 @@
           errors.add('The "androidPackage" must either be null or a string.');
         }
         if (kvp.value['iosPrefix'] != null && kvp.value['iosPrefix'] is! String) {
-          errors.add('The "iosPrefix" must eithe rbe null or a string.');
+          errors.add('The "iosPrefix" must either be null or a string.');
+        }
+        if (kvp.value['macosPrefix'] != null && kvp.value['macosPrefix'] is! String) {
+          errors.add('The "macosPrefix" must either be null or a string.');
         }
         if (kvp.value['pluginClass'] != null && kvp.value['pluginClass'] is! String) {
           errors.add('The "pluginClass" must either be null or a string..');
diff --git a/packages/flutter_tools/lib/src/plugins.dart b/packages/flutter_tools/lib/src/plugins.dart
index 5d14fa7..5f35e9f 100644
--- a/packages/flutter_tools/lib/src/plugins.dart
+++ b/packages/flutter_tools/lib/src/plugins.dart
@@ -27,16 +27,19 @@
     this.path,
     this.androidPackage,
     this.iosPrefix,
+    this.macosPrefix,
     this.pluginClass,
   });
 
   factory Plugin.fromYaml(String name, String path, dynamic pluginYaml) {
     String androidPackage;
     String iosPrefix;
+    String macosPrefix;
     String pluginClass;
     if (pluginYaml != null) {
       androidPackage = pluginYaml['androidPackage'];
       iosPrefix = pluginYaml['iosPrefix'] ?? '';
+      macosPrefix = pluginYaml['macosPrefix'] ?? '';
       pluginClass = pluginYaml['pluginClass'];
     }
     return Plugin(
@@ -44,6 +47,7 @@
       path: path,
       androidPackage: androidPackage,
       iosPrefix: iosPrefix,
+      macosPrefix: macosPrefix,
       pluginClass: pluginClass,
     );
   }
@@ -52,6 +56,7 @@
   final String path;
   final String androidPackage;
   final String iosPrefix;
+  final String macosPrefix;
   final String pluginClass;
 }
 
diff --git a/packages/flutter_tools/schema/pubspec_yaml.json b/packages/flutter_tools/schema/pubspec_yaml.json
index 632bece..58d41f6 100644
--- a/packages/flutter_tools/schema/pubspec_yaml.json
+++ b/packages/flutter_tools/schema/pubspec_yaml.json
@@ -58,6 +58,7 @@
                     "properties": {
                         "androidPackage": { "type": "string" },
                         "iosPrefix": { "type": "string" },
+                        "macosPrefix": { "type": "string" },
                         "pluginClass": { "type": "string" }
                     }
                 }