callJSFunction function

dynamic callJSFunction(
  1. String method, [
  2. List<Object?>? args
])

Calls JavaScript a function method with args.

Implementation

dynamic callJSFunction(String method, [List<Object?>? args]) {
  var argsList = args?.map((e) => e.jsify()).toList();
  return globalContext.callMethodVarArgs(method.toJS, argsList).dartify();
}