anchor.diff:  }
   
   @end
  +''';
  +
  +const String _swiftPluginRegistryTemplate = '''//
  +//  Generated file. Do not edit.
  +//
  +import Foundation
  +import {{framework}}
  +
  +{{#plugins}}
  +import {{name}}
  +{{/plugins}}
  +
  +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
  +  {{#plugins}}
  +  {{class}}.register(with: registry.registrar(forPlugin: "{{class}}"))
  +{{/plugins}}
  +}
   ''';
   
   const String _pluginRegistrantPodspecTemplate = '''
  
positive.code:   _renderTemplateToFile(_androidPluginRegistryTemplate, context, registryPath);
  }
  
  const String _cocoaPluginRegistryHeaderTemplate = '''//
  //  Generated file. Do not edit.
  //
  
  
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 {
  