title: How to properly enable/disable Flutter's Button
body: <p>Upon research, Flutter's Button is disabled automatically when the onPressed is null. However due to my necessary testing function I am forced to place an arrow function () => , which doesn't seem to trigger the onPressed as actually null, but returning null as value. Therefore currently the button just does nothing (null) when textField is empty. I am aiming to disable it fully (grayed out) if the textField is empty. </p>
  
  <blockquote>
    <p>onPressed: () => (_textController.text.isNotEmpty) ? _addNewPair() : null,</p>
  </blockquote>
  
  <pre><code>showDialog(
    context: this.context,
    builder: (BuildContext context) {
      return AlertDialog(
        title: Text('Add a custom word'),
        content: _renderForm(),
        actions: &lt;Widget&gt;[
          FlatButton(
            child: Text('ADD'),
            onPressed: () =&gt; (_textController.text.isNotEmpty) ? _addNewPair() : null,
          ),
        ],
      );
    }
  </code></pre>