title: Flutter: How to change the MaterialApp theme at runtime
body: <p>I have a <code>MaterialApp</code> Widget that sets the <code>theme</code> for all Widgets within the app.  I'd like to change the <code>MaterialApp</code>s <code>theme</code> value at runtime from a child Widget that doesn't have any direct reference to its parent <code>MaterialApp</code>.</p>
  
  <p>It seems like this should be possible because the <code>ThemeData</code> is provided by an <code>InheritedWidget</code>, but I can't figure out how to change the <code>theme</code> wholesale.  Does anyone know how to do this?</p>
  
  <p>Here is the <code>MaterialApp</code> that owns the rest of the app:</p>
  
  <pre><code>new MaterialApp(
      title: 'App Name',
      theme: initialTheme,
      routes: &lt;String, WidgetBuilder&gt;{
        '/' : ...,
      },
  ),
  </code></pre>