execute method Null safety

  1. @override
String execute()
override

Implementation

@override
String execute() {
  final builder = XmlBuilder();

  builder.element('component',
      attributes: {'name': 'ProjectRunConfigurationManager'}, nest: () {
    builder.element('configuration', attributes: {
      'default': 'false',
      'name': 'main-$_flavorName.dart',
      'type': 'FlutterRunConfigurationType',
      'factoryName': 'Flutter',
    }, nest: () {
      builder.element('option', attributes: {
        'name': 'buildFlavor',
        'value': '$_flavorName',
      });

      builder.element('option', attributes: {
        'name': 'filePath',
        'value': '\$PROJECT_DIR\$/lib/main-$_flavorName.dart',
      });

      builder.element('method', attributes: {
        'v': '2',
      });
    });
  });

  return builder.buildDocument().toXmlString(pretty: true);
}