getDependencies method

Map<String, dynamic>? getDependencies()

Gets dependencies from pubspec.yaml

Implementation

Map<String, dynamic>? getDependencies() {
  if (_pubspecContent == null) {
    throw StateError('Pubspec not loaded. Call load() first.');
  }

  final dependencies = _pubspecContent!['dependencies'];
  return dependencies is YamlMap
      ? Map<String, dynamic>.from(dependencies)
      : null;
}