Vector<T>.fromList constructor
Vector<T>.fromList (
- DataType<
T> dataType, - List<
T> source, { - VectorFormat? format,
Constructs a vector from a source list.
If format
is specified, source
is copied into a mutable vector of the
selected format; otherwise a view onto the possibly mutable source
is
provided.
Implementation
factory Vector.fromList(DataType<T> dataType, List<T> source,
{VectorFormat? format}) {
final result = ListVector.fromList(dataType, source);
return format == null ? result : result.toVector(format: format);
}