Created
February 11, 2024 08:53
-
-
Save GravenilvecTV/d65be8865548252075287c5df0b14a9c to your computer and use it in GitHub Desktop.
This file contains 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
Future<void> _showMyDialog() async { | |
return showDialog<void>( | |
context: context, | |
barrierDismissible: false, // user must tap button! | |
builder: (BuildContext context) { | |
return AlertDialog( | |
title: const Text('AlertDialog Title'), | |
content: const SingleChildScrollView( | |
child: ListBody( | |
children: <Widget>[ | |
Text('This is a demo alert dialog.'), | |
Text('Would you like to approve of this message?'), | |
], | |
), | |
), | |
actions: <Widget>[ | |
TextButton( | |
child: const Text('Approve'), | |
onPressed: () { | |
Navigator.of(context).pop(); | |
}, | |
), | |
], | |
); | |
}, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment