Skip to content

Commit e502a94

Browse files
committed
fix api call
1 parent 35873c5 commit e502a94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pubspec_api.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class _PubspecAPI {
44
final String baseUrl = "https://pub.dev/api/packages/";
55
_PubspecAPI();
66
Future<String?> getPackage(String package) async {
7-
http.Response res = await http.get(baseUrl + package as Uri);
7+
http.Response res = await http.get(Uri.parse(baseUrl + package));
88
if (res.statusCode == 200) {
99
Map<String, dynamic> resJson = json.decode(res.body);
1010
_PubPackage package = _PubPackage.fromMap(resJson);

0 commit comments

Comments
 (0)