Appearance
Uint16ListToJSUint16Array
extension Uint16ListToJSUint16Array on Uint16ListConversions from Uint16List to JSUint16Array.
Properties
toJS extension no setter
JSUint16Array get toJSConverts this Uint16List to a JSUint16Array by either casting, unwrapping, or cloning the Uint16List.
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 Uint16List is a wrapper around a Uint16Array if it was converted via JSUint16ArrayToUint16List.toDart. If it is a wrapper, this getter unwraps it and returns the Uint16Array. If it's instantiated in Dart, this getter clones this Uint16List's values into a new JSUint16Array.
Avoid assuming that modifications to this Uint16List will affect the returned JSUint16Array and vice versa on all compilers unless it was converted first via JSUint16ArrayToUint16List.toDart.
Available on Uint16List, provided by the Uint16ListToJSUint16Array extension
Implementation
dart
external JSUint16Array get toJS;