fromPathToMap static method

Map fromPathToMap(
  1. String path
)

parses the pubspec located at path to map

Implementation

static Map fromPathToMap(String path) {
  final File file = File(path);
  final String yamlString = file.readAsStringSync();
  final Map yamlMap = loadYaml(yamlString);
  return yamlMap;
}