collect abstract method
Returns a list containing the elements of this stream.
This is a terminal operation.
Example
final stream = DartStream.of([1, 2, 3, 4, 5]);
final list = stream.collect();
print(list); // [1, 2, 3, 4, 5]
Implementation
List<T> collect();