title: Dart lambda/shortland function confusion
body: <p>I'm still pretty new to Dart and the syntax of => (fat arrow) still confuses me (I come from C# background).</p>
  
  <p>So in C# fat arrow ( => ) says: <em>goes to</em> so for example:</p>
  
  <pre class="lang-csharp prettyprint-override"><code>Action&lt;string&gt; action1 = (str) =&gt; { System.Diagnostic.Debug.WriteLine("Parameter received: " + str.ToString()); }
  
  action1("Some parameter");
  </code></pre>
  
  <p>means: whatever send as parameter to <code>action1</code> (if it could be casted to <code>string</code>) <em>goes to</em>  inner scope (in our case it just printed in <code>Debug.WriteLine()</code></p>
  
  <p>but in Dart it's something different....  (?)</p>
  
  <p>for example in <code>Future.then</code></p>
  
  <pre class="lang-dart prettyprint-override"><code>ClassWithFutures myClass = new ClassWithFutures();
  myClass.loadedFuture.then( 
     (str) =&gt; { print("Class was loaded with info: $str"),
     onError: (exp) =&gt; { print("Error occurred in class loading. Error is: $exp"); }
  );
  </code></pre>
  
  <p>Dart editor warn me that the first and second <code>print</code> is: <code>Expected string literal for map entry key</code>. I think in C# way that <code>str</code> it just name for parameter that will be filled by internal callback that <code>Future.then</code> uses to call <code>onValue</code> or <code>onError</code></p>
  
  <p>What I'm doing wrong ?</p>