【发布时间】:2023-01-11 17:54:20
【问题描述】:
嗨,我是新手,面临以下错误
final String title;
final String desc;
final String timer;
const ListElement({Key? key, required this.title, required this.desc ,required this.timer}) :
super(key: key);
这是我的构造函数,我在其中传递了 title desc 和 timer
Text(title, style: TextStyle(fontWeight: FontWeight.w400 ,
fontSize: 30),),
Text(desc, style: TextStyle(fontWeight: FontWeight.w400 ,
fontSize: 15),),
在获取 title 和 desc 时我遇到了这个错误
【问题讨论】:
-
你能为 ui 和模型类提取正确的代码吗?
-
谢谢我解决了我的问题
-
请复习答案
-
你接受我的回答吗? @赫克托4888