Skip to content

Instantly share code, notes, and snippets.

@prafullakumar
Created May 11, 2020 17:13
Show Gist options
  • Save prafullakumar/0a986581f30cddb21dbf8cc24932417d to your computer and use it in GitHub Desktop.
Save prafullakumar/0a986581f30cddb21dbf8cc24932417d to your computer and use it in GitHub Desktop.
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text("Title", textAlign: TextAlign.center),
content: TextField(
decoration: InputDecoration(hintText: "Jhon Doe", labelText: 'Enter your username'),
),
actions: <Widget>[
FlatButton(
child: Text("Agree"),
onPressed: () {
Navigator.of(context).pop();
},
),
FlatButton(
child: Text("Close"),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
},
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment