W3cubDocs

/Dart 2

asStream method

Stream<T> asStream ()

Creates a Stream containing the result of this future.

The stream will produce single data or error event containing the completion result of this future, and then it will close with a done event.

If the future never completes, the stream will not produce any events.

Implementation

Stream<T> asStream();

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-async/Future/asStream.html