CircularBuffer<T>.of constructor
Creates a CircularBuffer based on another list
Implementation
CircularBuffer.of(List<T> list, [int? capacity])
: assert(
capacity == null || capacity >= list.length,
'The capacity must be at least as long as the existing list',
),
capacity = capacity ?? list.length,
_buf = [...list];