Skip to main content

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

PropertyType
dartany

Accessors

length

get length(): number

Returns the number of objects in this list.

Returns

number

Source

src/utils.ts:239

Methods

[iterator]()

[iterator](): Iterator<T, any, undefined>

Returns

Iterator<T, any, undefined>

Implementation of

Iterable.[iterator]

Source

src/utils.ts:268


clear()

clear(): void

Removes all objects from this list; the length of the list becomes zero.

Returns

void

Source

src/utils.ts:242


get()

get(index): T

Returns the object at the given [index] in the list.

Parameters

ParameterType
indexnumber

Returns

T

Source

src/utils.ts:251


includes()

includes(item, start?): boolean

Parameters

ParameterType
itemT
start?number

Returns

boolean

Source

src/utils.ts:259


push()

push(value): void

Adds [value] to the end of this list, extending the length by one.

Parameters

ParameterType
valueT

Returns

void

Source

src/utils.ts:248


remove()

remove(value): void

Removes the first occurrence of [value] from the list.

Parameters

ParameterType
valueT

Returns

void

Source

src/utils.ts:257


set()

set(index, value): T

Sets the value at the given [index] in the list to [value].

Parameters

ParameterType
indexnumber
valueT

Returns

T

Source

src/utils.ts:254


sort()

sort(): void

Sorts this list.

Returns

void

Source

src/utils.ts:245


fromDart()

static fromDart<T>(dart): DartList<T>

Creates a proxy to an existing Dart list.

Type parameters

Type parameter
T

Parameters

ParameterType
dartany

Returns

DartList<T>

Source

src/utils.ts:230