Last active
June 20, 2020 14:45
-
-
Save elleryq/aac651d3bb41d2cd79f144cb9a99367d to your computer and use it in GitHub Desktop.
Show confirm dialog in flutter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
showDialog( | |
context: context, | |
builder: (BuildContext context) { | |
return AlertDialog( | |
title: Text(""), | |
content: Text("確定刪除?"), | |
actions: <Widget>[ | |
FlatButton( | |
child: Text("取消"), | |
onPressed: () { | |
Navigator.of(context).pop(); | |
}, | |
), | |
FlatButton( | |
child: Text("刪除"), | |
onPressed: () { | |
model.deleteRoom(index); | |
}, | |
), | |
], | |
); | |
}, | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment