[doc/async] Change Stream.asyncMap doc according to the current behavior

Bug: #29615
Change-Id: I74309b9a488999bc73efa4c0a2310261da74c879
CoreLibraryReviewExempt: Documentation-only change
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340402
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This commit is contained in:
Sergey G. Grekhov 2023-12-12 11:10:55 +00:00 committed by Commit Queue
parent 11e29a7d9e
commit 911f7edc5f

View file

@ -775,9 +775,10 @@ abstract mixin class Stream<T> {
/// Creates a new stream with each data event of this stream asynchronously
/// mapped to a new event.
///
/// This acts like [map], except that [convert] may return a [Future],
/// and in that case, this stream waits for that future to complete before
/// continuing with its result.
/// This acts like [map], in that [convert] function is called once per
/// data event, but here [convert] may be asynchronous and return a [Future].
/// If that happens, this stream waits for that future to complete before
/// continuing with further events.
///
/// The returned stream is a broadcast stream if this stream is.
Stream<E> asyncMap<E>(FutureOr<E> convert(T event)) {