handlePromise method

Future<JsEvalResult> handlePromise(
  1. JsEvalResult value, {
  2. Duration? timeout,
})

Implementation

Future<JsEvalResult> handlePromise(JsEvalResult value,
    {Duration? timeout}) async {
  final completer = Completer<JsEvalResult>();

  if (timeout != null) {
    return _doHandlePromise(value, completer).timeout(timeout);
  } else {
    return _doHandlePromise(value, completer);
  }
}