问题描述
我在下面简单的代码
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)
例如:
AlertDialog
显示,我删除了 1 个项目。关闭 AlertDialog
后,我的列表将显示 9 项。
对不起,因为我的英语不好,请帮帮我
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)