提问人:Jill Clover 提问时间:10/2/2023 更新时间:10/2/2023 访问量:36
Flutter 显示黑白表情符号,但同样在终端上也能正常工作,就像预期的那样
Flutter shows black & white emoji, but the same works fine on terminal just like expected
问:
扑动:
如何解决这个问题?
fetchFeed() async {
try {
final response = await http.get(
Uri.parse('http://localhost:8080/'),
headers: {'Content-Type': 'application/json; charset=UTF-8'},
);
if (response.statusCode == 200) {
final List<dynamic> body = json.decode(utf8.decode(response.bodyBytes));
setState(() {
feedData =
body.map((dynamic item) => FeedItem.fromJson(item)).toList();
});
}
print(response.body);
print(response.statusCode);
} catch (e) {
print("Error: $e");
}
}
答: 暂无答案
评论