fetchPackageInfo method
GET https://pub.dev/api/packages/<name> — returns the latest
published version and its pubspec, or null if the package isn't
found or the request fails.
Implementation
Future<Map<String, dynamic>?> fetchPackageInfo(String name) {
return _getJson('https://pub.dev/api/packages/$name');
}