Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- showDialog(
- context: context,
- barrierDismissible: false,
- builder: (context) {
- return new CupertinoAlertDialog(
- title: new Text('Data not saved?'),
- content: new Text(
- 'Data will be lost. Are you sure you want to exit?'),
- actions: <Widget>[
- new CupertinoButton(
- onPressed: () => Navigator.of(context).pop(false),
- child: new Text('No'),
- ),
- new CupertinoButton(
- onPressed: () => Navigator.of(context).pop(true),
- child: new Text('Yes'),
- ),
- ],
- );
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement