BloomBreadcrumbRingBuffer class

Fixed-capacity ring buffer for storing recent chronological breadcrumbs.

Automatically evicts the oldest recorded breadcrumb when maxCapacity is reached.

Example:

final buffer = BloomBreadcrumbRingBuffer(maxCapacity: 50);
buffer.add(BloomBreadcrumb(category: 'ui', message: 'Button clicked'));
final history = buffer.toList();

Constructors

BloomBreadcrumbRingBuffer({int maxCapacity = 100})
Creates a BloomBreadcrumbRingBuffer with the given maxCapacity (must be > 0).

Properties

hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether the buffer contains zero breadcrumbs.
no setter
length int
Current number of breadcrumbs in the buffer.
no setter
maxCapacity int
Maximum number of breadcrumbs retained in memory.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(BloomBreadcrumb breadcrumb) → void
Adds a breadcrumb to the ring buffer, evicting the oldest if capacity is exceeded.
clear() → void
Clears all breadcrumbs from the buffer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toList() List<BloomBreadcrumb>
Returns a snapshot copy of all breadcrumbs in chronological order.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited