createJSInteropWrapper<T extends Object> function

JSObject createJSInteropWrapper<T extends Object>(
  1. T dartObject
)

Given a instance of a Dart class that contains an @JSExport annotation, creates a JavaScript object that wraps the given Dart object.

The object literal will be a map of properties, which are either the written instance member names or their renames, to callbacks that call the corresponding Dart instance members.

See https://dart.cn/interop/js-interop/mock for more details on how to declare classes that can be used in this method.

Implementation

external JSObject createJSInteropWrapper<T extends Object>(T dartObject);