DartList<T>
A proxy to a Dart List<T>.
Type parameters
| Type parameter |
|---|
T |
Implements
Iterable<T>
Indexable
[key: number]: any
Constructors
new DartList()
new DartList<
T>():DartList<T>
Returns
DartList<T>
Properties
| Property | Type |
|---|---|
dart | any |
Accessors
length
getlength():number
Returns the number of objects in this list.
Returns
number
Source
Methods
[iterator]()
[iterator]():
Iterator<T,any,undefined>
Returns
Iterator<T, any, undefined>
Implementation of
Iterable.[iterator]
Source
clear()
clear():
void
Removes all objects from this list; the length of the list becomes zero.
Returns
void
Source
get()
get(
index):T
Returns the object at the given [index] in the list.
Parameters
| Parameter | Type |
|---|---|
index | number |
Returns
T
Source
includes()
includes(
item,start?):boolean
Parameters
| Parameter | Type |
|---|---|
item | T |
start? | number |
Returns
boolean
Source
push()
push(
value):void
Adds [value] to the end of this list, extending the length by one.
Parameters
| Parameter | Type |
|---|---|
value | T |
Returns
void
Source
remove()
remove(
value):void
Removes the first occurrence of [value] from the list.
Parameters
| Parameter | Type |
|---|---|
value | T |
Returns
void
Source
set()
set(
index,value):T
Sets the value at the given [index] in the list to [value].
Parameters
| Parameter | Type |
|---|---|
index | number |
value | T |
Returns
T
Source
sort()
sort():
void
Sorts this list.
Returns
void
Source
fromDart()
staticfromDart<T>(dart):DartList<T>
Creates a proxy to an existing Dart list.
Type parameters
| Type parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
DartList<T>