We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35873c5 commit e502a94Copy full SHA for e502a94
lib/pubspec_api.dart
@@ -4,7 +4,7 @@ class _PubspecAPI {
4
final String baseUrl = "https://pub.dev/api/packages/";
5
_PubspecAPI();
6
Future<String?> getPackage(String package) async {
7
- http.Response res = await http.get(baseUrl + package as Uri);
+ http.Response res = await http.get(Uri.parse(baseUrl + package));
8
if (res.statusCode == 200) {
9
Map<String, dynamic> resJson = json.decode(res.body);
10
_PubPackage package = _PubPackage.fromMap(resJson);
0 commit comments