title: Using StreamBuilder and Navigator in my flutter app, but the first page builds twice
body: <p>guys.
  I am using StreamBuilder dealing with asynchronous data. </p>
  
  <p>Here is a demo that a button on the first page, click the button will navigate to the second page. The full code is below.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import 'package:flutter/material.dart';
  import 'dart:async' show StreamController;
  
  void main() {
    runApp(
      new MaterialApp(
        title: 'First Page',
        theme: new ThemeData(
          primarySwatch: Colors.blue,
        ),
        home: new FirstPage(),
      ),
    );
  }
  
  class FirstPage extends StatelessWidget {
    final StreamController&lt;String&gt; _streamController = StreamController&lt;String&gt;();
  
    @override
    Widget build(BuildContext context) {
      print('first page start to build ..................');
      StreamBuilder builder = new StreamBuilder(
          stream: _streamController.stream,
          builder: (context, asyncSnapshot) {
            if (asyncSnapshot.hasData) {
              print('first page data returned ..................');
              return RaisedButton(
                child: Text('go to the second page'),
                onPressed: () {
                  print('navigate to second page ..................');
                    Navigator.push(
                    context,
                    MaterialPageRoute(builder: (context) =&gt; SecondPage()),
                  );
                },
              );
            } else {
              return Text('waitting to update');
            }
          });
      return new Scaffold(
        appBar: new AppBar(
          title: new Text('First Page'),
        ),
        body: Column(
          children: &lt;Widget&gt;[
            RaisedButton(
              child: Text('update state'),
              onPressed: () {
                _streamController.add('hello world');
              },
            ),
            builder,
          ],
        ),
      );
    }
  
    dispose() {
      _streamController.close();
    }
  }
  
  class SecondPage extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      print('second page start to build ..................');
      return new Scaffold(
        appBar: new AppBar(
          title: new Text('Second Page'),
        ),
        body: Text('this is second page'),
      );
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here are the operation steps:</p>
  
  <ol>
  <li>click the 'update state ' button on the first page.</li>
  <li>the button 'go to the second page' will show.</li>
  <li>click  'go to the second page'  button will navigate to the second
  page.</li>
  <li>then click the button in the left corner of the second page to go
  back to the first page.</li>
  </ol>
  
  <p>The console will show something like that:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>I/flutter ( 3674): first page start to build ..................
  Reloaded 1 of 487 libraries in 1,734ms.
  I/flutter ( 3674): first page data returned ..................
  I/flutter ( 3674): navigate to second page ..................
  I/flutter ( 3674): second page start to build ..................
  I/flutter ( 3674): first page data returned ..................
  I/flutter ( 3674): first page data returned ..................</code></pre>
  </div>
  </div>
  </p>
  
  <p>My question is:</p>
  
  <ol>
  <li>The first page will build again after the second page build. Why?</li>
  <li>And when I back to the first page, the first page will build again,
  is it normal?</li>
  </ol>
  
  <p>Please help me.</p>