问题描述
编辑
谢谢大家的友好评论。
这很奇怪,但是昨天模拟器显示红色屏幕,显示type 'List<String>' is not a subtype of type 'List<Recyclable>' of 'function result'
。不知何故,当我今天重新运行模拟器以尝试再次解决该问题时,它运行良好!我会保留此帖子,以防万一有人发现它有用,并再次感谢大家的帮助!
原始帖子
我正在尝试遵循the flutter official website到(1)创建class
,(2)使用list
创建class
,(3)显示{{ 1}}使用list
。但是,终端说ListView
。我不知道为什么。
这是我的type 'List<String>' is not a subtype of type 'List<Recyclable>' of 'function result'
:
class
这是我的class Recyclable {
final String title;
final String description;
Recyclable(this.title,this.description);
}
:
list
这是我的List<Recyclable> recyclable = [
Recyclable('Plastic1','abc1'),Recyclable('Plastic2','abc2'),Recyclable('Plastic3','abc3'),Recyclable('Plastic4','abc4'),Recyclable('Plastic5','abc5'),Recyclable('Plastic6','abc6'),];
:
ListView
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)