<h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">Pages on Navigator stack rebuild when a new page is pushed onto the stack.<br>
Suppose the pages were numbered numerically, in the order they are pushed onto the stack  i.e. page 1 -&gt; page 2 -&gt; page 3. When we push Page 3, previous pages from page 1 to 2 rebuild as evident from the print statements. Is this a bug?</p>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import 'package:flutter/material.dart';

void main() {
  runApp(new MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter Demo',
      theme: new ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: new MyHomePage(id: 1),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.id}) : super(key: key);

  final int id;

  @override
  _MyHomePageState createState() =&gt; new _MyHomePageState();
}

class _MyHomePageState extends State&lt;MyHomePage&gt; {

  @override
  Widget build(BuildContext context) {
    print('Page ${widget.id} built!');
    return new Scaffold(
      appBar: new AppBar(
        title: new Text(widget.id.toString()),
      ),
      body: new Center(
        child: new RaisedButton(
          child: new Text('Open next page'),
          onPressed: () {
            Navigator.of(context).push(
              new MaterialPageRoute(
                builder: (_) =&gt; new MyHomePage(id: widget.id + 1),
                maintainState: true
              )
            );
          }
        )
      ),
    );
  }
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s">'package:flutter/material.dart'</span>;

<span class="pl-k">void</span> <span class="pl-en">main</span>() {
  <span class="pl-en">runApp</span>(<span class="pl-k">new</span> <span class="pl-c1">MyApp</span>());
}

<span class="pl-k">class</span> <span class="pl-c1">MyApp</span> <span class="pl-k">extends</span> <span class="pl-c1">StatelessWidget</span> {
  <span class="pl-k">@override</span>
  <span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) {
    <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">MaterialApp</span>(
      title<span class="pl-k">:</span> <span class="pl-s">'Flutter Demo'</span>,
      theme<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">ThemeData</span>(
        primarySwatch<span class="pl-k">:</span> <span class="pl-c1">Colors</span>.blue,
      ),
      home<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">MyHomePage</span>(id<span class="pl-k">:</span> <span class="pl-c1">1</span>),
    );
  }
}

<span class="pl-k">class</span> <span class="pl-c1">MyHomePage</span> <span class="pl-k">extends</span> <span class="pl-c1">StatefulWidget</span> {
  <span class="pl-c1">MyHomePage</span>({<span class="pl-c1">Key</span> key, <span class="pl-c1">this</span>.id}) <span class="pl-k">:</span> <span class="pl-c1">super</span>(key<span class="pl-k">:</span> key);

  <span class="pl-k">final</span> <span class="pl-c1">int</span> id;

  <span class="pl-k">@override</span>
  <span class="pl-c1">_MyHomePageState</span> <span class="pl-en">createState</span>() <span class="pl-k">=&gt;</span> <span class="pl-k">new</span> <span class="pl-c1">_MyHomePageState</span>();
}

<span class="pl-k">class</span> <span class="pl-c1">_MyHomePageState</span> <span class="pl-k">extends</span> <span class="pl-c1">State</span>&lt;<span class="pl-c1">MyHomePage</span>&gt; {

  <span class="pl-k">@override</span>
  <span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) {
    <span class="pl-en">print</span>(<span class="pl-s">'Page <span class="pl-s">${<span class="pl-v">widget</span>.<span class="pl-v">id</span>}</span> built!'</span>);
    <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">Scaffold</span>(
      appBar<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">AppBar</span>(
        title<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Text</span>(widget.id.<span class="pl-en">toString</span>()),
      ),
      body<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Center</span>(
        child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">RaisedButton</span>(
          child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Text</span>(<span class="pl-s">'Open next page'</span>),
          onPressed<span class="pl-k">:</span> () {
            <span class="pl-c1">Navigator</span>.<span class="pl-en">of</span>(context).<span class="pl-en">push</span>(
              <span class="pl-k">new</span> <span class="pl-c1">MaterialPageRoute</span>(
                builder<span class="pl-k">:</span> (_) <span class="pl-k">=&gt;</span> <span class="pl-k">new</span> <span class="pl-c1">MyHomePage</span>(id<span class="pl-k">:</span> widget.id <span class="pl-k">+</span> <span class="pl-c1">1</span>),
                maintainState<span class="pl-k">:</span> <span class="pl-c1">true</span>
              )
            );
          }
        )
      ),
    );
  }
}</pre></div>
<h2 dir="auto">Logs</h2>
<p dir="auto">When page 2 is pushed, the log outputs</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I/flutter (21176): Page 2 built!
I/flutter (21176): Page 2 built!
I/flutter (21176): Page 1 built!"><pre class="notranslate"><code class="notranslate">I/flutter (21176): Page 2 built!
I/flutter (21176): Page 2 built!
I/flutter (21176): Page 1 built!
</code></pre></div>
<p dir="auto">Expected:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I/flutter (21176): Page 2 built!  // only "><pre class="notranslate"><code class="notranslate">I/flutter (21176): Page 2 built!  // only 
</code></pre></div>
<p dir="auto">When page 3 is pushed, the log outputs</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I/flutter (21176): Page 2 built!
I/flutter (21176): Page 3 built!
I/flutter (21176): Page 3 built!
I/flutter (21176): Page 2 built!
I/flutter (21176): Page 1 built!"><pre class="notranslate"><code class="notranslate">I/flutter (21176): Page 2 built!
I/flutter (21176): Page 3 built!
I/flutter (21176): Page 3 built!
I/flutter (21176): Page 2 built!
I/flutter (21176): Page 1 built!
</code></pre></div>
<p dir="auto">Expected:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I/flutter (21176): Page 3 built!  // only "><pre class="notranslate"><code class="notranslate">I/flutter (21176): Page 3 built!  // only 
</code></pre></div>
<h2 dir="auto">Flutter Doctor</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[√] Flutter (on Microsoft Windows [Version 10.0.15063], locale en-US, channel master)
    • Flutter at C:\Users\tzm\Downloads\flutter_sdk
    • Framework revision b156a0f054 (5 days ago), 2017-08-11 22:01:40 -0700
    • Engine revision fef7d827d6
    • Tools Dart version 1.25.0-dev.9.0

[√] Android toolchain - develop for Android devices (Android SDK 25.0.3)
    • Android SDK at C:\Users\tzm\AppData\Local\Android\sdk
    • Platform android-26, build-tools 25.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)"><pre class="notranslate"><code class="notranslate">[√] Flutter (on Microsoft Windows [Version 10.0.15063], locale en-US, channel master)
    • Flutter at C:\Users\tzm\Downloads\flutter_sdk
    • Framework revision b156a0f054 (5 days ago), 2017-08-11 22:01:40 -0700
    • Engine revision fef7d827d6
    • Tools Dart version 1.25.0-dev.9.0

[√] Android toolchain - develop for Android devices (Android SDK 25.0.3)
    • Android SDK at C:\Users\tzm\AppData\Local\Android\sdk
    • Platform android-26, build-tools 25.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
</code></pre></div>
<p dir="auto">Flutter crash report; please file at <a href="https://github.com/flutter/flutter/issues">https://github.com/flutter/flutter/issues</a>.</p>
<h2 dir="auto">command</h2>
<p dir="auto">flutter build apk</p>
<h2 dir="auto">exception</h2>
<p dir="auto">FormatException: FormatException: Bad UTF-8 encoding 0xe4 (at offset 9)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#0      _Utf8Decoder.convert (dart:convert/utf.dart:484:15)
#1      _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:345:14)
#2      _Utf8ConversionSink.add (dart:convert/string_conversion.dart:341:5)
#3      _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:86:18)
#4      _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#5      _rootRunUnary (dart:async/zone.dart:1132:38)
#6      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#7      _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#8      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#9      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#10     _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
#11     _StreamController._add (dart:async/stream_controller.dart:639:7)
#12     _StreamController.add (dart:async/stream_controller.dart:585:5)
#13     _Socket._onData (dart:io/runtime/binsocket_patch.dart:1721:41)
#14     _rootRunUnary (dart:async/zone.dart:1136:13)
#15     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#16     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#17     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#18     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#19     _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
#20     _StreamController._add (dart:async/stream_controller.dart:639:7)
#21     _StreamController.add (dart:async/stream_controller.dart:585:5)
#22     new _RawSocket.&lt;anonymous closure&gt; (dart:io/runtime/binsocket_patch.dart:1283:33)
#23     _NativeSocket.issueReadEvent.issue (dart:io/runtime/binsocket_patch.dart:826:14)
#24     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#25     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#26     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#27     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)"><pre class="notranslate"><code class="notranslate">#0      _Utf8Decoder.convert (dart:convert/utf.dart:484:15)
#1      _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:345:14)
#2      _Utf8ConversionSink.add (dart:convert/string_conversion.dart:341:5)
#3      _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:86:18)
#4      _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#5      _rootRunUnary (dart:async/zone.dart:1132:38)
#6      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#7      _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#8      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#9      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#10     _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
#11     _StreamController._add (dart:async/stream_controller.dart:639:7)
#12     _StreamController.add (dart:async/stream_controller.dart:585:5)
#13     _Socket._onData (dart:io/runtime/binsocket_patch.dart:1721:41)
#14     _rootRunUnary (dart:async/zone.dart:1136:13)
#15     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#16     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#17     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#18     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#19     _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
#20     _StreamController._add (dart:async/stream_controller.dart:639:7)
#21     _StreamController.add (dart:async/stream_controller.dart:585:5)
#22     new _RawSocket.&lt;anonymous closure&gt; (dart:io/runtime/binsocket_patch.dart:1283:33)
#23     _NativeSocket.issueReadEvent.issue (dart:io/runtime/binsocket_patch.dart:826:14)
#24     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#25     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#26     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#27     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)
</code></pre></div>
<h2 dir="auto">flutter doctor</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="�[32m[✓]�[39m Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.17134.407], locale zh-CN)
    �[32m•�[39m Flutter version 1.0.0 at D:\AndroidSDK\flutter
    �[32m•�[39m Framework revision 5391447fae (11 days ago), 2018-11-29 19:41:26 -0800
    �[32m•�[39m Engine revision 7375a0f414
    �[32m•�[39m Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

�[32m[✓]�[39m Android toolchain - develop for Android devices (Android SDK 28.0.3)
    �[32m•�[39m Android SDK at E:\androidsdk
    �[32m•�[39m Android NDK location not configured (optional; useful for native profiling support)
    �[32m•�[39m Platform android-28, build-tools 28.0.3
    �[32m•�[39m ANDROID_HOME = E:\androidsdk
    �[32m•�[39m Java binary at: F:\android-studio-ide-181.5014246-windows\android-studio\jre\bin\java
    �[32m•�[39m Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    �[32m•�[39m All Android licenses accepted.

�[32m[✓]�[39m Android Studio (version 3.2)
    �[32m•�[39m Android Studio at F:\android-studio-ide-181.5014246-windows\android-studio
    �[32m•�[39m Flutter plugin version 31.1.1
    �[32m•�[39m Dart plugin version 181.5656
    �[32m•�[39m Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

�[33m[!]�[39m Connected device
    �[33m!�[39m No devices available

�[33m!�[39m Doctor found issues in 1 category."><pre class="notranslate"><code class="notranslate">�[32m[✓]�[39m Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.17134.407], locale zh-CN)
    �[32m•�[39m Flutter version 1.0.0 at D:\AndroidSDK\flutter
    �[32m•�[39m Framework revision 5391447fae (11 days ago), 2018-11-29 19:41:26 -0800
    �[32m•�[39m Engine revision 7375a0f414
    �[32m•�[39m Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

�[32m[✓]�[39m Android toolchain - develop for Android devices (Android SDK 28.0.3)
    �[32m•�[39m Android SDK at E:\androidsdk
    �[32m•�[39m Android NDK location not configured (optional; useful for native profiling support)
    �[32m•�[39m Platform android-28, build-tools 28.0.3
    �[32m•�[39m ANDROID_HOME = E:\androidsdk
    �[32m•�[39m Java binary at: F:\android-studio-ide-181.5014246-windows\android-studio\jre\bin\java
    �[32m•�[39m Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    �[32m•�[39m All Android licenses accepted.

�[32m[✓]�[39m Android Studio (version 3.2)
    �[32m•�[39m Android Studio at F:\android-studio-ide-181.5014246-windows\android-studio
    �[32m•�[39m Flutter plugin version 31.1.1
    �[32m•�[39m Dart plugin version 181.5656
    �[32m•�[39m Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

�[33m[!]�[39m Connected device
    �[33m!�[39m No devices available

�[33m!�[39m Doctor found issues in 1 category.
</code></pre></div>