tryParsePubspecSync function
Try parsing the pubspec of the given directory.
If the parsing fails for any reason, returns null.
Implementation
Pubspec? tryParsePubspecSync(Directory directory) {
try {
return parsePubspecSync(directory);
} catch (_) {
return null;
}
}