问题描述
我正在尝试更新ObservableList索引,但是没有更新:
final user = ObservableList<User>.of([
User(
price: "10",name: "todo",)
]);
void updateName() {
runInAction(() => user[0].name = "Tom");
}
// Result UI
Observer(
builder: (BuildContext context) => Text(userProivder.user[0].name))
// Button action
ButtonValidation(
title: S.of(context).valider,onClick: () {
userProivder.updatetodo(20);
}),
但是名称值不变吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)