Created
February 28, 2018 21:22
-
-
Save anilcancakir/9bdd418bff7c630ffc4410d0d78b81c7 to your computer and use it in GitHub Desktop.
Forms in Flutter - Code #2
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
| class _LoginPageState extends State<LoginPage> { | |
| final GlobalKey<FormState> _formKey = new GlobalKey<FormState>(); | |
| @override | |
| Widget build(BuildContext context) { | |
| return new Scaffold( | |
| appBar: new AppBar( | |
| title: new Text('Login'), | |
| ), | |
| body: new Container( | |
| padding: new EdgeInsets.all(20.0), | |
| child: new Form( | |
| key: this._formKey, | |
| child: new ListView( | |
| children: <Widget>[ | |
| // We will add fields here. | |
| ], | |
| ), | |
| ) | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment