title: In Flutter, how do I pass data into a Stateless Widget?
body: <p>I'm trying to build my first Flutter app, and have run into difficulty with passing data into Stateless Widgets.  I have the following classes:</p>
  
  <pre><code>class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return new MaterialApp(
        title: 'App Title',
        theme: new ThemeData(
          primarySwatch: Colors.green,
        ),
        home: new MainBody(),
      );
    }
  }
  
  
  class MainBody extends StatelessWidget {
  
    @override
    Widget build(BuildContext context) {
      return new Scaffold(
        body: new Padding(
          padding: const EdgeInsets.only(left: 20.0, right: 20.0),
          child: new Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: &lt;Widget&gt;[
              new TimeCheck(),
            ],
          ),
        ),
      );
    }
  }
  </code></pre>
  
  <p><code>TimeCheck</code> is a <code>Stateful Widget</code>.  Basically, I want to be able to set some values at the start, and then pass them along to <code>TimeCheck</code>, via <code>MainBody</code>.  Everything I read shows how to pass data into <code>Stateful Widgets</code>, but is it possible to pass it through a <code>Stateless Widget</code>?</p>
  
  <p>I recognise I may be taking the wrong approach, so in case it helps, what I'd ultimately like to do is have a "settings" page where the user can set the values for the data (a string and some numbers), and then those values get passed to <code>TimeCheck</code> where they're used to generate the display.</p>
  
  <p>I'd also like to be able to save the user-set values if possible, so they don't have to enter them each time, and then I'd like to be able to read them in when <code>TimeCheck</code> is instantiated.</p>