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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user