toList method

  1. @override
Future<List<T>> toList()
override

Collects all elements of this stream in a List.

Creates a List<T> and adds all elements of this stream to the list in the order they arrive. When this stream ends, the returned future is completed with that list.

If this stream emits an error, the returned future is completed with that error, and processing stops.

Implementation

@override
Future<List<T>> toList() => origin.toList();