clientside.js
async function callClientAsyncFuncWithResult () {
let result = await someService.request();
return result;
}
page.dart
import 'dart:js' as js;
var result = js.context.callMethod('callClientAsyncFuncWithResult');
//I want to do something like var result = await js.context.callMethod('callClientAsyncFuncWithResult');
How in AngularDart do you wait for a client side javascript Promise to return with result before continuing execution in dart? Right now it just flows over the call and I've tried setting the result of callMethod to Future or Promise and it never waits.
I don't think my implementation is correct. How can I achieve this?