title: Flutter - RaisedButton onPressed with Multiple Condition
body: <p>Just move to flutter and little bit frustration about multiple condition in raisedbutton onpressed.</p>
  
  <p>I have bool <code>buttonDisabled1</code> and bool <code>buttonDisabled2</code>. I want <code>if buttonDisabled1 == true AND buttonDisabled2 == true</code> (both of them == true), so <code>onPressed = null</code>, it works.</p>
  
  <p>However, if <code>buttonDisabled1 or buttonDisabled2 == false</code> (ONE of them is false) <code>onPressed</code> not null anymore.</p>
  
  <p>My goal is :</p>
  
  <pre><code>buttonDisabled1 == true AND buttonDisabled2 == true -&gt; onpressed null;
  buttonDisabled1 == false AND buttonDisabled2 == true -&gt; onpressed null; 
  buttonDisabled1 == true AND buttonDisabled2 == false -&gt; onpressed null; 
  buttonDisabled1 == false AND buttonDisabled2 == false -&gt; onpressed not null;
  </code></pre>
  
  <p>Thanks in advice :) </p>
  
  <p>Below my code, none of them works.</p>
  
  <pre class="lang-dart prettyprint-override"><code>Widget build(BuildContext context) {
    bool buttonDisabled1 = true;
    bool buttonDisabled2 = true;
  
  RaisedButton(
    child: Text('Click'),
    onPressed: buttonDisabled1 &amp;&amp; buttonDisabled2 ? null : (){},
  ),
  }
  </code></pre>
  
  <pre class="lang-dart prettyprint-override"><code>RaisedButton(
    child: Text('Click'),
    onPressed: (buttonDisabled1 &amp;&amp; buttonDisabled2) ? null : (){},
  ),
  </code></pre>
  
  <pre class="lang-dart prettyprint-override"><code>RaisedButton(
    child: Text('Click'),
    onPressed: ((buttonDisabled1) &amp;&amp; (buttonDisabled2)) ? null : (){},
  ),
  </code></pre>