SetBeacon<E> class

A beacon that holds a set of values.

Inheritance

Constructors

SetBeacon(Set<E> initialValue, {String? name})
@macro SetBeacon

Properties

$$widgetSubscribers$$ → Set<int>
The hashcode of all widgets subscribed to this beacon. This should not be used directly.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
initialValue → Set<E>
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 → Set<E>?
The previous value of the beacon.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stream → Stream<Set<E>>
Returns a broadcast Stream that emits the current value and all subsequent updates to the value of this beacon.
no setterinherited
value ↔ Set<E>
Returns the current value and subscribes to changes in the beacon when used within a Beacon.effect or Beacon.derived.
getter/setter pairinherited

Methods

add(E value) → void
Adds value to the set.
addAll(Iterable<E> iterable) → void
Adds all elements in iterable to this set.
call() → Set<E>
Equivalent to calling value getter.
inherited
clear() → void
Removes all elements from the set.
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
guard() → void
Prevents the beacon from being disposed by its dependants. The beacon will still be disposed if its dependencies are 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() → Set<E>
Return the current value of the beacon without subscribing to it.
inherited
remove(Object? value) → bool
Removes value from the set.
removeAll(Iterable<E> iterable) → void
Removes each element of iterable from this set.
removeWhere(bool test(E element)) → void
Removes all elements of this set that satisfy test.
reset({bool force = false}) → void
Clears the set
override
retainWhere(bool test(E element)) → void
Removes all elements of this set that fail to satisfy test.
set(Set<E> newValue, {bool force = false}) → void
Sets the value of the beacon and allows a force notification
inherited
subscribe(void callback(Set<E>), {bool startNow = true}) → VoidCallback
Subscribes to changes in the beacon returns a function that can be called to unsubscribe
inherited
subscribeSynchronously(void callback(Set<E>), {bool startNow = true}) → VoidCallback
Subscribes to changes in the beacon returns a function that can be called to unsubscribe
inherited
toString() → String
A string representation of this object.
inherited

Operators

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