stream_chunker

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

stream chunker

Breaks a stream into chunks for analysis or processing.
Usage #
You can also find this in the /example folder.
import 'package:stream_chunker/stream_chunker.dart';

void main() {
// Create a stream
Stream<int> stream = Stream.fromIterable("Hello world!".runes.toList());

// Create chunker to get chunks of size 6
final chunker = StreamChunker<int>(6);

// Transform the original stream into chunks
final chunkedStream = stream.transform(chunker);

// Print the chunks
int i = 0;
chunkedStream.listen((chunk) {
var text = String.fromCharCodes(chunk);
print('Chunk $i: $text');
});
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.