Skip to content

Uint32ListToJSUint32Array

extension Uint32ListToJSUint32Array on Uint32List

Conversions from Uint32List to JSUint32Array.

Properties

toJS extension no setter

JSUint32Array get toJS

Converts this Uint32List to a JSUint32Array by either casting, unwrapping, or cloning the Uint32List.

INFO

Depending on whether code is compiled to JavaScript or Wasm, this conversion will have different semantics.

When compiling to JavaScript, all typed lists are the equivalent JavaScript typed arrays, and therefore this getter simply casts.

When compiling to Wasm, this Uint32List is a wrapper around a Uint32Array if it was converted via JSUint32ArrayToUint32List.toDart. If it is a wrapper, this getter unwraps it and returns the Uint32Array. If it's instantiated in Dart, this getter clones this Uint32List's values into a new JSUint32Array.

Avoid assuming that modifications to this Uint32List will affect the returned JSUint32Array and vice versa on all compilers unless it was converted first via JSUint32ArrayToUint32List.toDart.

Available on Uint32List, provided by the Uint32ListToJSUint32Array extension

Implementation
dart
external JSUint32Array get toJS;