PackageTrack
Sign in Get early access

circular_buffer

A Dart Circular Buffer container based on List with a fixed capacity.

0.13.0 80K downloads/mo #1215 most downloaded on pub.dev kranfix/dart-circularbuffer

What this package is like to depend on

Last release 4 months ago

12 Apr 2026

Release timing varies

gaps range from 1 weeks to 2.4 years

Nearly every release is documented

notes for 10 of 10 stable releases

Nothing withdrawn

no release was ever pulled

8 years old

10 releases · first in 2018

1 release in the last 12 months

see the full history below

Release timeline

10 releases · May 2018 to Apr 2026
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 10
  1. 0.13.0 12 Apr 2026
    Release notes
    • Fixed addHead to correctly drop the tail element when the buffer is full.
    • Removed deprecated reset() method (deprecated since 0.12.0, use clear() instead).
    • insert() now explicitly throws UnsupportedError.
    • CircularBuffer.of([]) and CircularBuffer.of([], 1) now throw AssertionError (capacity must be > 1).
    • Internal buffer is now pre-allocated with fixed capacity; clear() releases references for garbage collection.
    Open source →
  2. 0.12.0 28 Sep 2024
    Release notes
    • Added addHead method.
    • Deprecated reset method in favor of clear.
    Open source →
  3. 0.11.0 18 Apr 2022
    Release notes
    • Fixed incorrect buffer state when adding items after calling reset.

    • Made clear be an alias to reset instead of throwing an error.

    • Fixed to work with nullable element types.

    • Simplified the implementation.

    Open source →
  4. 0.10.0 13 Aug 2021
    Release notes
    • Added a CircularBuffer.of(List<T> list, [int? capacity]) constructor.
    Open source →
  5. 0.9.1 28 Mar 2021
    Release notes
    • Added documentation to CircularBuffer class
    • Added example to README
    Open source →
  6. 0.9.0 28 Mar 2021
    Release notes
    • Migrated to null-safety (thanks to @shyndman)
    • Added test for border conditions
    Open source →
  7. 0.8.0 03 Feb 2021
    Release notes
    • The CircularBuffer minimum capacity is 2
    • Added tests
    Open source →
  8. 0.7.0 23 Jan 2021
    Release notes
    • Use ListMixin.
    Open source →
  9. 0.6.0 16 Mar 2020
    Release notes
    • Migration to Dart 2.
    • Added forEach method.
    Open source →
  10. 0.5.0 14 May 2018
    Release notes
    • A circular buffer made in Dart 1.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive