title: How to asynchronously call JavaScript in Flutter?
body: <p>I have a flutter web where i have a JavaScript function like this:</p>
  <pre><code>async function doSomething(value) {
     let x = await something(x);
     return x
  }
  </code></pre>
  <p>When I'm now in dart, I have:</p>
  <pre><code>final result = await js.context.callMethod('doSomething', ['someValue']));
  </code></pre>
  <p>This returns <code>[object Promise]</code> when I print it, but it does ignore <code>await</code>, does not have a <code>.then</code> function and is therefore not working with <code>promiseToFuture</code> either.</p>
  <p>How can I wait for JavaScript to be executed?</p>