【发布时间】:2022-08-13 21:40:47
【问题描述】:
有一个 API 的响应看起来像下面这个 sn-p,我想添加值(一段时间内的学生分数)并在 UI 上的文本小部件中显示总值
data : [
{
score : 10
}
{
score: 34
}
{
score: 45
}
]
-
你在使用任何模型类吗?
-
@YeasinSheikh 是的,我正在使用模型类
-
尝试评论/回答可能会解决您的问题
-
列表<结果>?结果;类结果 { Result({ this.id, this.assessments, });细绳? ID;列出<评估>?评估; } 类评估 { 评估({ this.id, this.score, });细绳? ID;诠释?分数; } @YeasinSheikh