CircularBuffer<T> constructor

CircularBuffer<T>({
  1. required int capacity,
  2. void changeListener(
    1. List<T> value
    )?,
})

Creates a CircularBuffer with a capacity

Implementation

CircularBuffer({
  required this.capacity,
  this.changeListener,
})  : assert(capacity > 1, 'CircularBuffer must have a positive capacity.'),
      _buf = [];