fix: [Can't get package info after upgrgade to v1.3.1](https://github.com/fluttercommunity/plus_plugins/issues/747)

This commit is contained in:
2022-02-17 17:45:28 +08:00
parent 775e7c8d3a
commit def733f7c5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ class Api {
T? res;
try {
if (resp.statusCode != HttpStatus.ok && resp.bodyBytes.length == 0)
throw HttpErrorCode(resp.statusCode, message: 'No resp body');
throw HttpErrorCode(resp.statusCode, message: 'No resp body from ${resp.request!.url.path}');
var decodeBody = json.decode(utf8.decode(resp.bodyBytes));
res = decodeBody is Map ? builder(decodeBody) : builder({'list': decodeBody});
} catch (e) {