title: Dynamic AppBar of Flutter
body: <p>I have to change AppBar appearance and items dynamically (by tapping on another UI elements).
  What is the best approach?</p>
  
  <p>I tested several methods. For example,</p>
  
  <pre><code>return Scaffold(
        appBar: StreamBuilder(
            stream: bloc.tasks,
            builder: (context, AsyncSnapshot&lt;List&lt;UserTask&gt;&gt; tasks) {
              return new AppBar();/// my setup is here
            }),
  </code></pre>
  
  <p>but this is obviously doesn't compile.</p>