StreamList<E>.of constructor
StreamList<E>.of (
- Iterable<
E> elements, { - bool growable = true,
- OnUpdate<
List< ? onUpdate,E> > - OnEvent<
CollectionEvent< ? onEvent,int, E> > - OnChange<
CollectionChangeEvent< ? onChange,int, E> >
Creates a list from elements
.
The Iterator of elements
provides the order of the elements.
This constructor creates a growable list when growable
is true;
otherwise, it returns a fixed-length list.
Implementation
factory StreamList.of(
Iterable<E> elements, {
bool growable = true,
OnUpdate<List<E>>? onUpdate,
OnEvent<CollectionEvent<int, E>>? onEvent,
OnChange<CollectionChangeEvent<int, E>>? onChange,
}) {
return StreamList(
value: List<E>.of(elements, growable: growable),
onUpdate: onUpdate,
onEvent: onEvent,
onChange: onChange,
);
}