title: Change Icon of Icon-Widget dynamically in Flutter
body: <p>I am new to Flutter and I wanted to create a speech to text application.
  Therefore I want a Button, whos icon changes depending if the a variable is true or false.
  I am using a floatingActionButton:</p>
  <pre><code>floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
    floatingActionButton: FloatingActionButton(
      onPressed: () {
        print(_isListening);
        _isListening = !_isListening;
      },
      child: Icon(_isListening ? Icons.mic_rounded : Icons.mic_rounded ),
    ),
  </code></pre>
  <p>And the first line of my code is the definition of my variable:</p>
  <pre><code>bool _isListening = false;
  </code></pre>
  <p>The &quot;print(_isListening) is giving me the desired output in the console, but in the app, nothing changes.
  Is there anything I am doing wrong?</p>