title: The argument Future can not be assigned to the parameter type void Function()
body: <p>I have a statefull widged where a button has</p>
  
  <pre><code>onPressed: _exportData,
  </code></pre>
  
  <p>where _exportData defined this way</p>
  
  <pre><code>Future&lt;void&gt; _exportData() async { 
  ...
      setState(() {
        _message = 'A message'; // I want to use localization string here
      });
  }
  </code></pre>
  
  <p>I need to pass localization string into the above setState() and I do it this way</p>
  
  <pre><code>Lang.key(ctx, 'about')
  </code></pre>
  
  <p>i.e. I need to pass the context there, but when I try to make it like this</p>
  
  <pre><code>onPressed: _exportData(ctx), // the error here
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Future&lt;void&gt; _exportData(BuildContext ctx) async {...
  </code></pre>
  
  <p>there is an error on <em>onPressed</em></p>
  
  <blockquote>
    <p>The argument Future can not be assigned to the parameter type
    'void Function()'</p>
  </blockquote>
  
  <p>How cat I pass context inside <em>_exportData</em> or how can I use localization string from inside the <em>_exportData</em>? </p>
  
  <p><strong><em>update</strong>: actualy there was no need to pass context into _exportData, because context is awailable inside state class</em></p>