ListBuilder<E> class

The Built Collection builder for BuiltList.

It implements the mutating part of the List interface.

See the Built Collection library documentation for the general properties of Built Collections.

Constructors

ListBuilder([Iterable iterable = const []])
Instantiates with elements from an Iterable.
factory

Properties

first ↔ E
As List.first.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
As List.isEmpty.
no setter
isNotEmpty bool
As List.isNotEmpty.
no setter
last ↔ E
As List.last.
getter/setter pair
length int
As List.length.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(E value) → void
As List.add.
addAll(Iterable<E> iterable) → void
As List.addAll.
build() BuiltList<E>
Converts to a BuiltList.
clear() → void
As List.clear.
expand(Iterable<E> f(E)) → void
As Iterable.expand, but updates the builder in place. Returns nothing.
fillRange(int start, int end, E fillValue) → void
As List.fillRange, but requires a value.
insert(int index, E element) → void
As List.insert.
insertAll(int index, Iterable<E> iterable) → void
As List.insertAll.
map(E f(E)) → void
As Iterable.map, but updates the builder in place. Returns nothing.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(Object? value) bool
As List.remove.
removeAt(int index) → E
As List.removeAt.
removeLast() → E
As List.removeLast.
removeRange(int start, int end) → void
As List.removeRange.
removeWhere(bool test(E)) → void
As List.removeWhere.
replace(Iterable iterable) → void
Replaces all elements with elements from an Iterable.
replaceRange(int start, int end, Iterable<E> iterable) → void
As List.replaceRange.
retainWhere(bool test(E)) → void
As List.retainWhere.
reverse() → void
As List.reversed, but updates the builder in place. Returns nothing.
setAll(int index, Iterable<E> iterable) → void
As List.setAll.
setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) → void
As List.setRange.
shuffle([Random? random]) → void
As List.shuffle.
skip(int n) → void
As Iterable.skip, but updates the builder in place. Returns nothing.
skipWhile(bool test(E)) → void
As Iterable.skipWhile, but updates the builder in place. Returns nothing.
sort([int compare(E, E)?]) → void
As List.sort.
sublist(int start, [int? end]) → void
As List.sublist, but updates the builder in place. Returns nothing.
take(int n) → void
As Iterable.take, but updates the builder in place. Returns nothing.
takeWhile(bool test(E)) → void
As Iterable.takeWhile, but updates the builder in place. Returns nothing.
toString() String
A string representation of this object.
inherited
update(dynamic updates(ListBuilder<E>)) → void
Applies a function to this.
where(bool test(E)) → void
As Iterable.where, but updates the builder in place. Returns nothing.

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) → E
As List.elementAt.
operator []=(int index, E element) → void
As List.