📅  最后修改于: 2022-03-11 14:55:29.238000             🧑  作者: Mango
confirmDismiss: (DismissDirection direction) async {
return await showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: const Text("Confirm"),
content: const Text("Are you sure you wish to delete this item?"),
actions: [
FlatButton(
onPressed: () => Navigator.of(context).pop(true),
child: const Text("DELETE")
),
FlatButton(
onPressed: () => Navigator.of(context).pop(false),
child: const Text("CANCEL"),
),
],
);
},
);
},