1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-13 10:59:04 +00:00

UTF-8 fix (#590)

This commit is contained in:
Brett Morgan
2020-11-15 14:22:27 +11:00
committed by GitHub
parent 84d0251e2a
commit 689d7f2c8e
3 changed files with 8 additions and 8 deletions

View File

@@ -64,7 +64,7 @@ class Unsplash {
dynamic body;
try {
body = json.decode(response.body);
body = json.fuse(utf8).decode(response.bodyBytes);
} catch (e) {
throw UnsplashException('Invalid JSON received');
}