buffer_with_count 0.1.0

A Stream transformer that buffers events by a count based threshold

Buffer With Count

A Stream transformer that buffers events by a count based threshold

Example

import 'dart:async';
import 'package:buffer_with_count/buffer_with_count.dart';

main() {
  var controller = new StreamController();

  controller.stream.transform(new BufferWithCount(4)).listen(print);

  for (var i = 0; i < 10; i++) {
    controller.add(i);
  }

  controller.close();
}