Open
Description
The implementation for Stream.pipe is:
Future pipe(StreamConsumer<T> streamConsumer) {
return streamConsumer.addStream(this).then((_) => streamConsumer.close());
}
Shouldn't this method return Future<void>
rather than Future<dynamic>
? My motivation is for #35825, where I'm catching code like:
myStream
.pipe(something)
.catchError((e) => print(e));
So Future<dynamic>.catchError
's onError
handler should return FutureOr<dynamic>
, and returning void
from the handler would be an error.