fromFuture static method
Implementation
static JSPromise fromFuture(Future<dynamic> future) {
return JSPromise((List funcs) {
final resolve = funcs[0];
final reject = funcs[1];
future.then((v) => resolve(v)).catchError((e) => reject(e));
});
}