title: Flutter - Push and Get value between routes
body: <p>How do I send the green string from the HomePage page to the ContaPage page?</p>
  
  <p>I think it's so <code>Navigator.of(context).pushNamed('/conta/green');</code> but I do not know how to get in the page <code>conta</code> the <code>green</code> string</p>
  
  <p>So, by getting the value of the string I can for example change the color of the backgroundColor of <code>appBar</code> in <code>ContaPage</code>.</p>
  
  <p><strong>main.dart</strong></p>
  
  <pre><code>import "package:flutter/material.dart";
  
  void main() {
    runApp(new MyApp());
  }
  
  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return new MaterialApp(
        title: "MyApp",
        home: new HomePage(),
        routes: &lt;String, WidgetBuilder&gt; {
          '/home': (BuildContext context) =&gt; new HomePage(),
          '/conta': (BuildContext context) =&gt; new ContaPage()
        },
      );
    }
  }
  
  class HomePage extends StatelessWidget {
    @override
    Widget build(BuildContext context) =&gt; new Scaffold(
      appBar: new AppBar(
        backgroundColor: new Color(0xFF26C6DA),
      ),
      body: new ListView  (
        children: &lt;Widget&gt;[
          new FlatButton(
            child: new Text("ok"),
            textColor: new Color(0xFF66BB6A),               
            onPressed: () {
              Navigator.of(context).pushNamed('/conta');
            },
          ),
        ],
      )
    );
  }
  
  class ContaPage extends StatelessWidget {
    @override
    Widget build(BuildContext context) =&gt; new Scaffold(
      appBar: new AppBar(
        backgroundColor: new Color(0xFF26C6DA),
      ), 
    );
  }
  </code></pre>