toDart property

List<T> toDart

Converts this JSArray to a List by either casting or wrapping it.

When compiling to JavaScript, Lists are JSArrays and this will be a cast. When compiling to Wasm, a wrapper is introduced. Modifications to this JSArray will affect the List and vice versa. In order to ensure type soundness, this method may introduce casts when accessing elements in order to ensure they are of type T.

Implementation

external List<T> get toDart;