Appearance
JSArrayToList<T extends JSAny?>
Conversions from JSArray to List.
Properties
toDart extension no setter
List<T> get toDartConverts this JSArray to a List by either casting or wrapping it.
INFO
Depending on whether code is compiled to JavaScript or Wasm, this conversion will have different semantics.
When compiling to JavaScript, core Lists are Arrays and therefore, if the JSArray was already a <code>List<T></code> converted via ListToJSArray.toJS, this getter simply casts the Array. Otherwise, it wraps the Array with a List that casts the elements to T to ensure soundness.
When compiling to Wasm, the JSArray is wrapped with a List implementation and the wrapper is returned.
Modifications to this JSArray will affect the returned List and vice versa.
Available on JSArray<T extends JSAny?>, provided by the JSArrayToList<T extends JSAny?> extension
Implementation
dart
external List<T> get toDart;