Flutter-Dialog弹框

_showAboutDialog() {

showDialog(

context:context,

builder: (BuildContext context) {

return AlertDialog(

title: Text("About"),

content: Text("Show me the code."),

actions: [

FlatButton(child: Text("cancel"),textColor: Colors.grey,onPressed: (){

Navigator.of(context).pop();

},),

FlatButton(child: Text("github"),onPressed: (){

_launchURL();

Navigator.of(context).pop();

},)

],

);

});

}


Flutter-Dialog弹框_第1张图片

_showAboutDialog() {

showDialog(

context:context,

builder: (BuildContext context) {

return SimpleDialog(

title: Text("About"),

content: Text("Show me the code."),

actions: [

FlatButton(child: Text("cancel"),textColor: Colors.grey,onPressed: (){

Navigator.of(context).pop();

},),

FlatButton(child: Text("github"),onPressed: (){

_launchURL();

Navigator.of(context).pop();

},)

],

);

});

}


Flutter-Dialog弹框_第2张图片

你可能感兴趣的:(Flutter-Dialog弹框)