title: How to wait for a Dart Future to complete, synchronously
body: <p>Say, I have an async function that I want to call in a synchronous function. For example:</p>
  
  <pre><code>Future&lt;int&gt; foo() async {
    // do something
    return 109;
  }
  
  int bar() {
    var r = wait_for_future(foo());
    return r;
  }
  </code></pre>
  
  <p>What I'm looking for is a possible implementation for <code>wait_for_future</code>. Can this even be done in Dart?</p>