stream_data_reader 1.0.8 icon indicating copy to clipboard operation
stream_data_reader: ^1.0.8 copied to clipboard

A library help you control stream, like that fetch data when you read.

StreamReader #

A library help you control stream, like that fetch data when you read.

Import #

add in pubspec.yaml, like this:

stream_reader: ^1.0.7

Usage #


Stream<List<int>> testStream() async* {
	yield [0x00, 0x00, 0x01, 0x00];
	yield [0x00, 0x00, 0x00, 0x01];
}

void main() async {
	final dataReader = DataReader(ByteBufferReader(StreamReader(testStream())));
	print(await dataReader.readInt());
	transformStream(transformByteStream(dataReader.releaseStream(), (reader) {
		return reader.readOneByte();
	}), (reader) {
		return reader.read();
	}).listen(print);
}
0
likes
100
pub points
2%
popularity

Publisher

unverified uploader

A library help you control stream, like that fetch data when you read.

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.BSD-2-Clause (LICENSE)

More

Packages that depend on stream_data_reader