导致的问题是模型中的类别列表,我已经执行了强制转换方法,但它仍然不起作用。请帮帮我,我被困在这里2天了。<dynamic>' is not a subtype of type 'List<String>'
FutureBuilder/src/widgets/async.dart:773:55)
#3 StatefulElement.build (
我不明白为什么我不能打印列表中的元素。并且总是返回"type 'List‘is not a subtype of type 'List’of 'function result'“ import 'package:flutter/material.dartI/flutter (13445): items[i]
I/chatty (13445): uid=10155(com.example.flutterappse)
我刚开始使用Flutter编写代码,现在我正在尝试从restapi获取数据。我在debug中得到了这个错误类型'list<dynamic>' is not a subtype of type 'string' ? 有什么解决方案吗?apiservice: Future<List<Petani>> getDafPet() async {
final response = await client.get("
在这里,我试图让一个未来的列表视图构建器,得到一个错误消息:_TypeError (类型'List‘不是类型’Map‘的子类型)颤动。我需要在列表视图中获取post中的所有数据。await http.get(Uri.https('jsonplaceholder.typicode.com', 'posts'));
var data = jsonDecodepostsToJson