parse method

Future<Map<String, dynamic>> parse()

Implementation

Future<Map<String, dynamic>> parse() async {
  File configFile = File(path.join(brick.absolute.path, 'pubspec.yaml'));
  String fileContents = await configFile.readAsString();
  yaml = loadYamlDocument(fileContents).contents.value;

  Map<String, bool> env = _parseEnv();
  List<String> dependencies = _parseDependencies();
  Map<String, dynamic> android = _parsePlatformConfig('android');
  Map<String, String> envOverride = {};
  List<String> gitignore = _parseGitignore();

  if (env['override'] ?? false) {
    envOverride = _parseEnvOverride();
  }

  return {
    'env': env,
    'dependencies': dependencies,
    'android': android,
    'env_override': envOverride,
    'gitignore': gitignore,
  };
}