BufferedCountBeacon<T> class

A beacon that exposes a buffer of values that have been added to it.

Inheritance

Constructors

BufferedCountBeacon({required int countThreshold, String? name})
@macro BufferedCountBeacon

Properties

$$widgetSubscribers$$ Set<int>
The hashcode of all widgets subscribed to this beacon. This should not be used directly.
finalinherited
countThreshold int
The number of values that will be added to the buffer before it is emitted.
final
currentBuffer ReadableBeacon<List<T>>
The current buffer of values that have been added to this beacon. This can be listened to directly.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
initialValue List<T>
The initial value of the beacon.
no setterinherited
isDisposed bool
Returns true if the beacon has been disposed.
no setterinherited
isEmpty bool
Returns true if the beacon has not been initialized.
no setterinherited
listenersCount int
The number of listeners subscribed to this beacon.
no setterinherited
name String
The name of the beacon. For debugging purposes.
no setterinherited
previousValue List<T>?
The previous value of the beacon.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<List<T>>
Returns a broadcast Stream that emits the current value and all subsequent updates to the value of this beacon.
no setterinherited
value List<T>
Returns the current value and subscribes to changes in the beacon when used within a Beacon.effect or Beacon.derived.
no setterinherited

Methods

add(T newValue) → void
Adds a new value to the buffer.
inherited
call() List<T>
Equivalent to calling value getter.
inherited
clearWrapped() → void
Disposes all currently wrapped beacons
inherited
dispose() → void
Clears all registered listeners and resouces used by the beacon. You will not be able to update or subscribe to the beacon after it has been disposed.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDispose(VoidCallback callback) → VoidCallback
Registers a callback to be called when the beacon is disposed. Returns a function that can be called to remove the callback.
inherited
peek() List<T>
Return the current value of the beacon without subscribing to it.
inherited
reset({bool force = false}) → void
Clears the buffer
inherited
set(T value, {bool force = false}) → void
Sets the delegate beacon to listen to.
inherited
subscribe(void callback(List<T>), {bool startNow = true, bool synchronous = false}) → VoidCallback
Subscribes to changes in the beacon returns a function that can be called to unsubscribe
inherited
toStream({bool synchronous = false}) Stream<List<T>>
Returns a broadcast Stream that emits the current value and all subsequent updates to the value of this beacon. If synchronous is true, autobatching will be disabled and all updates will be emitted immediately.
inherited
toString() String
A string representation of this object.
inherited

Operators

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