StreamBuffer<T> constructor

StreamBuffer<T>({
  1. bool throwOnError = false,
  2. int limit = 0,
})

Create a stream buffer with optional, soft limit to the amount of data the buffer will hold before pausing the underlying stream. A limit of 0 means no buffer limits.

Implementation

StreamBuffer({bool throwOnError = false, int limit = 0})
    : _throwOnError = throwOnError,
      _limit = limit;