length property - JSArray extension type - dart:js_interop library (original) (raw)

description

  1. @Since('3.6')

int getlength

The length in elements of this Array.

Implementation

@Since('3.6')
external int get length;
  1. @Since('3.6')

setlength (int newLength)

Sets the length in elements of this Array.

Setting it smaller than the current length truncates this Array, and setting it larger adds empty slots, which requires T to be nullable.

Implementation

@Since('3.6')
external set length(int newLength);