Merge pull request #5252 from 21pages/batch

simple ab store and add batch operation toast
This commit is contained in:
RustDesk
2023-08-04 15:38:53 +08:00
committed by GitHub
4 changed files with 14 additions and 9 deletions

View File

@@ -61,7 +61,7 @@ class AbModel {
authHeaders['Accept-Encoding'] = "gzip";
final resp = await http.get(Uri.parse(api), headers: authHeaders);
if (resp.body.isNotEmpty && resp.body.toLowerCase() != "null") {
Map<String, dynamic> json = jsonDecode(resp.body);
Map<String, dynamic> json = jsonDecode(utf8.decode(resp.bodyBytes));
if (json.containsKey('error')) {
abError.value = json['error'];
} else if (json.containsKey('data')) {