我在将响应json放在列表上时遇到了问题。当我尝试转换主体数据(数据来自的地方)时,我得到了错误: The getter 'body' isn't defined for the type 'Response<dynamic>'.Try importing the library that defines 'body', correcting the name to the name of
我期望的是数据的JSON对象,但我得到的却是Instance of 'Post' 我是第一次接触flutter,并且尝试使用http.dart包通过post请求来访问API。我正在使用一个异步未来和一个未来构建来用返回的数据填充一个小部件(遵循这里的flutter示例:https://flutter.io/docs/cookbook/networking/fetch-data": "1"}));
if (respons
我在logcat中得到以下错误: type 'List<dynamic>' is not a subtype of type 'String' in type cast
E/flutter (13443): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: NoSuchMethodError: The getter '