title: Flutter Web submit form on enter key
body: <p>Is there a way to call the submit button when a user hits the enter button when filling out a form.  Here is my form code:</p>
  
  <pre><code>@override
    Widget build(BuildContext context) {
      String _email;
      return AlertDialog(
        title: Text('Password Reset'),
        content: Form(
          key: _formKey,
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: [
              TextFormField(
                decoration: InputDecoration(
                  hintText: 'Email',
                  labelText: 'Email',
                ),
                autofocus: true,
                maxLength: 30,
                validator: (value) {
                  if (value.isEmpty) {
                    return 'Email is required';
                  }
                  return null;
                },
                onSaved: (input) =&gt; _email = input,
              ),
            ],
          ),
        ),
        actions: [
          RaisedButton(
            onPressed: () async {
              if (_formKey.currentState.validate()) {
                _formKey.currentState.save();
                var result = await auth.sendPasswordResetEmail(_email);
                print(result);
                Navigator.of(context).pop();
              }
            },
            child: Text('Reset'),
          )
        ],
      );
    }
  </code></pre>