jsify method

JSAny? jsify()

Converts a Dart object to the JavaScript equivalent if possible.

Effectively the inverse of JSAnyUtilityExtension.dartify, jsify takes a Dart object and recursively converts it to a JavaScript value. Only Dart primitives, Iterables, typed lists, and Maps are supported.

Note

Prefer using the specific conversion method like toJS if you know the Dart type as this method may perform many type-checks.

Implementation

// TODO(srujzs): We likely need stronger tests for this method to ensure
// consistency.
external JSAny? jsify();