如何在颤动飞镖中重新加载 CheckboxListTile?

问题描述

我在下面简单的代码

RaisedButton(
   onpressed: () {
    showDialog(
        context: context,builder: (BuildContext context) {
          return AlertDialog(
            content: Container(
              child: Padding(
                padding: const EdgeInsets.all(8.0),child: Form(
                  child: Column(
                    children: <Widget>[
                    ................
                    ],),actions: [
              RaisedButton(
                  onpressed: () {
                    model.delete();
                  }),],);
        });

................

Expanded(
    child: model.isBusy
    ? CircularProgressIndicator()
    : ListView.builder(
        padding: const EdgeInsets.all(8),itemCount: model.listinit.length,itemBuilder: (BuildContext context,int index) {
          return CheckBoxListTile(
            value: true,onChanged: (value) {
               .....
            },activeColor: Colors.green,);

注意上面的代码在同一个类中

我想要当我按下按钮时(model.delete -> 删除列表中的一项)。 CheckBoxListTile 我会重新加载(listinit)

例如:

CheckBoxListTile 我有 10 件商品

AlertDialog 显示,我删除了 1 个项目。关闭 AlertDialog 后,我的列表将显示 9 项。

对不起,因为我的英语不好,请帮帮我

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...