LimitedStreamController<T> constructor

LimitedStreamController<T>(
  1. int _limit, {
  2. void onListen()?,
  3. void onCancel()?,
  4. bool sync = false,
})

Creates a new LimitedStreamController that limits the no. of elements that can be in the queue.

Implementation

LimitedStreamController(this._limit,
    {void Function()? onListen, void Function()? onCancel, bool sync = false})
    : _streamController = StreamController<T>(
          onListen: onListen, onCancel: onCancel, sync: sync);