title: Assign function/method to variable in Dart
body: <p>Does Dart support the concept of variable functions/methods? So to call a method by its name stored in a variable.</p>
  <p>For example in PHP this can be done not only for methods:</p>
  
  <pre class="lang-dart prettyprint-override"><code>// With functions...
  function foo()
  {
      echo 'Running foo...';
  }
  
  $function = 'foo';
  $function();
  
  // With classes...
  public static function factory($view)
  {
      $class = 'View_' . ucfirst($view);
      return new $class();
  }
  </code></pre>
  <p>I did not found it in the language tour or API. Are others ways to do something like this?</p>