getDescription method

String? getDescription()

Gets the package description from pubspec.yaml

Implementation

String? getDescription() {
  if (_pubspecContent == null) {
    throw StateError('Pubspec not loaded. Call load() first.');
  }

  final description = _pubspecContent!['description'];
  return description?.toString();
}