evaluateAsync method

  1. @override
Future<JsEvalResult> evaluateAsync(
  1. String code, {
  2. String? sourceUrl,
})
override

Implementation

@override
Future<JsEvalResult> evaluateAsync(String code, {String? sourceUrl}) async {
  String strResult = await _flutterJs.eval(code);
  return JsEvalResult(
    strResult,
    null,
    isError: strResult.startsWith('ERROR:'),
    isPromise: strResult == '[object Promise]',
  );
}