title: Flutter navigation push, while keeping the same Appbar
body: <p>I'm currently building a Flutter app where I'm struggling to figure out the best way to implement navigation.</p>
  <p>I have 2 pages which are:</p>
  <ul>
  <li><strong>HomePage</strong>: from there I want to use an IndexedStack to manage the feed.</li>
  <li><strong>ProfilePage</strong>: the profile page, which (graphically) shares the same AppBar and the same Drawer as the home page.</li>
  </ul>
  <p>In my App the user reaches the HomePage immediately after logging in. There is no navigation involved.</p>
  <p>From there, I now have a TextButton, which calls <code>Navigator.of(context).pushNamed(AppRoutes.profile)</code>.</p>
  <p>As I said, both pages share the same Appbar and Drawer, so I created a custom myScaffold.
  Both pages use this scaffold.</p>
  <p>So the behavior is correct, since after clicking the button, the ProfilePage is moved over the HomePage.</p>
  <p>My problem is that graphically the appbar should remain the same, but when the profile page is pushed, the animation makes it clear that it is not the same app bar.</p>
  <ul>
  <li><p>Is it possible to animate the entry of the profile page, without
  animating the rebuilding of the appbar?</p>
  </li>
  <li><p>Or is it possible to push a route directly into the scaffold content?</p>
  </li>
  <li><p>As an alternative I was just thinking of writing a function which
  returns the page widget to be displayed within the scaffold content.
  But this kind of approach doesn't seem right to me, since there are
  routes.</p>
  </li>
  </ul>
  <p>From the official documentation you can see from the Interactive example what I mean:
  <a href="https://flutter.dev/docs/cookbook/navigation/navigation-basics" rel="nofollow noreferrer">Docs</a></p>
  <p><strong>When the second route is built over the first one, a new Appbar is built over the previous one.
  But what if I need the appbar to stay the same?</strong></p>