title: How to use If statement in Flutter widget
body: <p>I'm new in flutter and practicing simple app. But now, I can insert one line conditional statement but I want to add If statement. So I can add more statement. How do I do that? Here is my code. Please have a look. I want to add more color when I reach targeted amount <strong>color: _moneyCounter > 1000 ? Colors.green : Colors.red,</strong></p>
  
  <pre><code>Expanded(
                child: Center(
                  child: Text(
                    '\USD $_moneyCounter',
                    style: TextStyle(
                      color: _moneyCounter &gt; 1000 ? Colors.green : Colors.red,
                      fontSize: 40.0,
                    ),
                  ),
                ),
              ),
  </code></pre>