title: Showing TextField's error text in Flutter
body: <p>I'm building a sign-in screen with 2 inputs. I want to verify the email address when the button is pressed. My guess is I have to let the view know the value has been changed.</p>
  
  <p><strong>Button</strong></p>
  
  <pre class="lang-dart prettyprint-override"><code>   RaisedButton(
      color: Colors.blue,
      textColor: Colors.white,
      child: Text('Login'),
      shape: RoundedRectangleBorder(
          borderRadius: new BorderRadius.circular(4)),
      onPressed: () {
        print('hey');
  
        if (!EmailValidator.validate(_emailController.text)) {
          _emailValid = false;
          return;
        }
  
        // do login stuffs
      },
    )
  </code></pre>
  
  <p><strong>Text Field</strong></p>
  
  <pre class="lang-dart prettyprint-override"><code>_textFieldWidget('Email', false, _emailController, TextInputType.emailAddress, _emailValid ? 'not valid' : null)
  </code></pre>
  
  <pre class="lang-dart prettyprint-override"><code>Widget _textFieldWidget(String label, bool obscureText,
      TextEditingController controller, TextInputType type, String errorText) {
    return new TextField(
      obscureText: obscureText,
      controller: controller,
      keyboardType: type,
      decoration: InputDecoration(
          border: OutlineInputBorder(), labelText: label, errorText: errorText),
    );
  }
  </code></pre>