streamFromInputStream method
Stream<Map<String, dynamic> >
streamFromInputStream(
- Stream<
ParserInput> inputStream, { - OutputParserOptions? options,
override
Streams the output of invoking the Runnable on the given inputStream
.
Implementation
@override
Stream<Map<String, dynamic>> streamFromInputStream(
final Stream<ParserInput> inputStream, {
final OutputParserOptions? options,
}) async* {
if (reduceOutputStream) {
await inputStream.forEach(
(final input) => _parseStream(input, options: options),
);
yield _lastOutputMap;
_clear();
} else {
yield* super
.streamFromInputStream(inputStream, options: options)
.distinct(const DeepCollectionEquality().equals)
.doOnCancel(_clear);
}
}