list - 颤振:从列表中删除卡不起作用
问题描述
我已经创建了带有成功显示的卡片的列表现在我正在尝试使用删除按钮删除卡片但没有将其删除
我写的代码
List<DriverList> list = DriverList.list();
按钮代码:
FlatButton(
child: Text("Cancel"),
onPressed: () {
showDialog(
context: context,
child: new AlertDialog(
title: new Text("Fair Bid"),
content: new Text("Are you sure you want to
cancel?"),
actions: <Widget>[
// usually buttons at the bottom of the dialog
new FlatButton(
child: new Text("OK"), onPressed: () {
list.removeAt(index);
}),
],
));
},
解决方案
推荐阅读
- pandas - 数据框中所有列的 2 行之间的 Dask ttest
- r - 如何使用 R 基于相同的行 ID 对值求和?
- javascript - 无法在函数内部设置值
- terraform - 领事服务无法启动
- flutter - 没有定义颜色的问题
- python - 在 python 中制作了一个模具模拟器来改进它?
- angular - Angular 在继续计算之前等待模板更新?
- android - 如何添加根据屏幕保持平台响应的填充?
- dart - (Moor Flutter) 单个实体中的多个关系
- spring-boot - 如何在 KafkaListenerContainerFactory 创建的 KafkaListener 类中添加 Micrometer Timer?