load method

Future<void> load()

Loads and parses the pubspec.yaml file

Implementation

Future<void> load() async {
  final file = File(_pubspecPath);
  if (!await file.exists()) {
    throw FileSystemException('pubspec.yaml not found at: $_pubspecPath');
  }

  final content = await file.readAsString();
  _pubspecContent = loadYaml(content) as YamlMap;
}