Skip to content

Instantly share code, notes, and snippets.

@anilcancakir
Created February 28, 2018 21:22
Show Gist options
  • Select an option

  • Save anilcancakir/9bdd418bff7c630ffc4410d0d78b81c7 to your computer and use it in GitHub Desktop.

Select an option

Save anilcancakir/9bdd418bff7c630ffc4410d0d78b81c7 to your computer and use it in GitHub Desktop.
Forms in Flutter - Code #2
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