onDone<T> method
Null safety
- Stream<
T> stream, - void onDone(
Implementation
Stream<T> onDone<T>(Stream<T> stream, void Function() onDone) =>
stream.transform(StreamTransformer.fromHandlers(handleDone: (sink) {
sink.close();
onDone();
}));