Created
May 11, 2020 17:13
-
-
Save prafullakumar/0a986581f30cddb21dbf8cc24932417d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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