anchor.diff:    _renderTemplateToFile(_androidPluginRegistryTemplate, context, registryPath);
   }
   
  -const String _cocoaPluginRegistryHeaderTemplate = '''//
  +const String _objcPluginRegistryHeaderTemplate = '''//
   //  Generated file. Do not edit.
   //
   
  
positive.code:       .where((Plugin p) => p.pluginClass != null && p.macosPrefix != null)
        .map<Map<String, dynamic>>((Plugin p) => <String, dynamic>{
      'name': p.name,
      'prefix': p.macosPrefix,
      'class': p.pluginClass,
    }).toList();
    final Map<String, dynamic> context = <String, dynamic>{
      'os': 'macos',
      'deploymentTarget': '10.13',
      'framework': 'FlutterMacOS',
      'plugins': macosPlugins,
    };
    final String registryDirectory = project.macos.managedDirectory.path;
    return await _writeCocoaPluginRegistrant(project, context, registryDirectory);
  }
  
  Future<void> _writeCocoaPluginRegistrant(FlutterProject project,
      Map<String, dynamic> templateContext, String registryDirectory) async {
  
    if (project.isModule) {
      final String registryClassesDirectory = fs.path.join(registryDirectory, 'Classes');
      _renderTemplateToFile(
        _pluginRegistrantPodspecTemplate,
        templateContext,
        fs.path.join(registryDirectory, 'FlutterPluginRegistrant.podspec'),
      );
      _renderTemplateToFile(
        _cocoaPluginRegistryHeaderTemplate,
        templateContext,
        fs.path.join(registryClassesDirectory, 'GeneratedPluginRegistrant.h'),
      );
      _renderTemplateToFile(
        _cocoaPluginRegistryImplementationTemplate,
        templateContext,
        fs.path.join(registryClassesDirectory, 'GeneratedPluginRegistrant.m'),
      );
    } else {
      _renderTemplateToFile(
        _cocoaPluginRegistryHeaderTemplate,
        templateContext,
        fs.path.join(registryDirectory, 'GeneratedPluginRegistrant.h'),
      );
      _renderTemplateToFile(
        _cocoaPluginRegistryImplementationTemplate,
        templateContext,
        fs.path.join(registryDirectory, 'GeneratedPluginRegistrant.m'),
      );
    }
  }
  
  /// Rewrites the `.flutter-plugins` file of [project] based on the plugin
  
negative.code:     'plugins': iosPlugins,
    };
    final String registryDirectory = project.ios.pluginRegistrantHost.path;
    if (project.isModule) {
      final String registryClassesDirectory = fs.path.join(registryDirectory, 'Classes');
      _renderTemplateToFile(
        _pluginRegistrantPodspecTemplate,
        context,
        fs.path.join(registryDirectory, 'FlutterPluginRegistrant.podspec'),
      );
      _renderTemplateToFile(
        _objcPluginRegistryHeaderTemplate,
        context,
        fs.path.join(registryClassesDirectory, 'GeneratedPluginRegistrant.h'),
      );
      _renderTemplateToFile(
        _objcPluginRegistryImplementationTemplate,
        context,
        fs.path.join(registryClassesDirectory, 'GeneratedPluginRegistrant.m'),
      );
    } else {
      _renderTemplateToFile(
        _objcPluginRegistryHeaderTemplate,
        context,
        fs.path.join(registryDirectory, 'GeneratedPluginRegistrant.h'),
      );
      _renderTemplateToFile(
        _objcPluginRegistryImplementationTemplate,
        context,
        fs.path.join(registryDirectory, 'GeneratedPluginRegistrant.m'),
      );
    }
  }
  
  Future<void> _writeMacOSPluginRegistrant(FlutterProject project, List<Plugin> plugins) async {
  