show method
void
show(
{ - dynamic title = "Aviso!",
- required String message,
- required BuildContext context,
})
Implementation
void show(
{title = "Aviso!",
required String message,
required BuildContext context}) {
if (!this._isDialogShowing) {
this._isDialogShowing = true;
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: new Text(
title,
style: TextStyle(fontWeight: FontWeight.bold),
),
content: new Text(message),
actions: <Widget>[
new TextButton(
child: new Text(
"OK",
style: TextStyle(fontWeight: FontWeight.bold),
),
onPressed: () {
this._isDialogShowing = false;
Navigator.of(context).pop();
},
),
],
);
},
);
}
}