streamFromInputStream method
Stream<RunOutput>
streamFromInputStream(
- Stream<
RunInput> inputStream, { - RunnableOptions? options,
override
Streams the output of invoking the Runnable on the given inputStream
.
Implementation
@override
Stream<RunOutput> streamFromInputStream(
final Stream<RunInput> inputStream, {
final RunnableOptions? options,
}) async* {
Stream<Object?> nextStepStream;
try {
nextStepStream = first.streamFromInputStream(
inputStream,
options: first.getCompatibleOptions(options),
);
} on TypeError catch (e) {
_throwInvalidInputTypeStream(e, first);
}
for (final step in middle) {
try {
nextStepStream = step.streamFromInputStream(
nextStepStream,
options: step.getCompatibleOptions(options),
);
} on TypeError catch (e) {
_throwInvalidInputTypeStream(e, step);
}
}
try {
yield* last.streamFromInputStream(
nextStepStream,
options: last.getCompatibleOptions(options),
);
} on TypeError catch (e) {
_throwInvalidInputTypeStream(e, last);
}
}