title: Change AppBar title depending on page with BottomNavigationBar
body: <p>I'm trying to change the AppBar title depending on which page the user is on - the pages are controlled by a BottomNavigationBar which loads the different classes(pages)</p>
  
  <p>The only way i've managed to change this is by including a appbar for each page, which i believe is not the way to go ahead.</p>
  
  <pre><code>class HomePage extends StatefulWidget {
    final String title;
  
    HomePage({Key key, this.auth, this.userId, this.onSignedOut, this.title})
        : super(key: key);
  
    final BaseAuth auth;
    final VoidCallback onSignedOut;
    final String userId;
  
    @override
    State&lt;StatefulWidget&gt; createState() =&gt; new _HomePageState();
  }
  
  class _HomePageState extends State&lt;HomePage&gt; {
    int _currentIndex = 0;
    final List&lt;Widget&gt; _children = [
      Projects(),
      TimedProject(),
      Overview(),
      Clients(),
    ];
  
    GlobalKey&lt;ScaffoldState&gt; _scaffoldKey = new GlobalKey();
  
    @override
    Widget build(BuildContext context) {
      return new Scaffold(
        key: _scaffoldKey,
        appBar: AppBar(
          title: Text('TITLE I NEED TO CHANGE DEPENDING ON PAGE',
            style: TextStyle(color: Colors.black),
          ),
  
          backgroundColor: Colors.white,
        ),
        endDrawer: AppDrawer(),
        body: _children[_currentIndex],
        bottomNavigationBar: BottomNavigationBar(
          onTap: onTabTapped,
          currentIndex: _currentIndex,
          selectedItemColor: Theme.of(context).primaryColor,
          type: BottomNavigationBarType.fixed,
          items: [
            new BottomNavigationBarItem(
              icon: Icon(Icons.storage),
              title: Text('Jobs'),
            ),
            new BottomNavigationBarItem(
              icon: Icon(Icons.timer),
              title: Text('Timer'),
            ),
            new BottomNavigationBarItem(
              icon: Icon(Icons.pie_chart_outlined),
              title: Text('Overview'),
            ),
            new BottomNavigationBarItem(
                icon: Icon(Icons.supervisor_account), title: Text('Clients'))
          ],
        ),
      );
    }
  
    void onTabTapped(int index) {
      setState(() {
        _currentIndex = index;
      });
    }
  }
  </code></pre>