Future<void> _neverSatisfied() async { return showDialog<void>( context: context, barrierDismissible: false, // tap on button! builder: (BuildContext context) { return AlertDialog( title: Text('Rewind and remember'), content: SingleChildScrollView( child: ListBody( children: <Widget>[ Text('Flutter Title.'), Text('Flutter Message for the Dialog.'), ], ), ), actions: <Widget>[ FlatButton( child: Text('Regret'), onPressed: () { Navigator.of(context).pop(); }, ), ], ); }, ); }
Flutter Alert Dialog Examples