title: Manually setting Flutter Validation Error
body: <p>After validating a form and sending a request from flutter to the server backend: I want to set any potential error message from the server to be displayed in the original form. Preferably exactly like a validation error.</p>
  
  <p>For instance:</p>
  
  <pre class="lang-dart prettyprint-override"><code>Widget build(BuildContext context) {
  ...
    TextFormField(
      onFieldSubmitted: (value) =&gt; _signIn(),
      validator: (input) {
        if (input.length &lt; 6)
          return 'Your password is too short';
        return null;
      },
      onSaved: (input) =&gt; _password = input,
      decoration: InputDecoration(
        labelText: 'Password',
      ),
      obscureText: true,
    )
  ...
  }
  
  Future&lt;void&gt; _signIn() async {
    final formState = _formKey.currentState;
    if (!formState.validate()) return;
    formState.save();
  
    try {
      ... // do fancy request stuff
    } catch (e) {
      // this is where I want to set the "validation" error
    }
  }
  </code></pre>