title: How to set instance field to final in Stateless widget?
body: <p>I have <code>Stateless</code> widget. When user tap button I call method which calculate value. I need pass this value to next page with <code>Navigator.push</code>.</p>
  
  <p>For example, I have:</p>
  
  <pre><code>class Page1 extends StatelessWidget {
    String value1;
    String value2;
  
  …
  
  child: RaisedButton(
    onPressed: () async {
      await _calculateValue(context);
  
      Navigator.push(
          context,
          new MaterialPageRoute(
              builder: (BuildContext context) =&gt;
                  new Page2(
                    value1: value1,
                    value2: value2,
                  )));
  
  …
  
  _calculateValue(BuildContext context) async {
  
  value1 = …
  value2 = …
  </code></pre>
  
  <p>But when I do this <code>flutter analyze</code> give warning: </p>
  
  <blockquote>
    <p>This class (or a class which this class inherits from) is marked as
    '@immutable', but one or more of its instance fields are not final</p>
  </blockquote>
  
  <p>I cannot just declare <code>value1</code> final because it then give error:</p>
  
  <blockquote>
    <p>error: The final variable ‘value1’ must be initialized.</p>
  </blockquote>
  
  <p>How I can solve this?</p>