getPubspecInfo static method
Implementation
static String? getPubspecInfo() {
try {
String currentDirectory = Directory.current.path;
String pubspecPath = '$currentDirectory$kPubspecPath';
File pubspecFile = File(pubspecPath);
String contents = pubspecFile.readAsStringSync();
var yaml = loadYaml(contents);
return yaml[kName];
} catch (e) {
Utility.errorPrinter(text: '$kErrorReadingPubspec $e');
return null;
}
}