Skip to content

Instantly share code, notes, and snippets.

@PeterHdd
Created May 26, 2021 19:35
Show Gist options
  • Save PeterHdd/2e36a81a6561b00dffe0971a63c60427 to your computer and use it in GitHub Desktop.
Save PeterHdd/2e36a81a6561b00dffe0971a63c60427 to your computer and use it in GitHub Desktop.
void showMessage(String message) {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text("Error"),
content: Text(message),
actions: [
TextButton(
child: Text("Ok"),
onPressed: () {
Navigator.of(context).pop();
},
)
],
);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment