SetCachedWatcher<E> class

SetCachedWatcher

A generic CachedWatcher for Set

Inheritance
Available Extensions

Constructors

SetCachedWatcher(Set<E> initialValue, String key)

Properties

cache Future
no setterinherited
first → E
The first element.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
initialValue Set<E>
finalinherited
isCaching bool
isCaching
no setterinherited
isDisposed bool
Flag which returns true if you called the dispose method. It is useful when you want to safely do some operations on the Watcher without getting an exception if it gets disposed.
no setterinherited
isEmpty bool
Whether this collection has no elements.
no setterinherited
isNotEmpty bool
Whether this collection has at least one element.
no setterinherited
iterator Iterator<E>
An iterator that iterates over the elements of this Watcher's value.
no setterinherited
key String
key
latefinalinherited
last → E
The last element.
no setterinherited
length int
The number of elements in this.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
safeMode bool
safeMode if enabled will not allow any setting of value or notifying any listeners if the Watcher isDisposed
finalinherited
single → E
Checks that this iterable has only one element, and returns that element.
no setterinherited
stream Stream<Set<E>>
Converts the Watcher into a Stream. This stream emits values whenever the value changes. The use of distinct ensures that consecutive duplicate values are filtered out, thus the stream only emits when the value actually changes.
no setterinherited
v Set<E>
Equivalent to the getter value but in shorter syntax.
getter/setter pairinherited
value Set<E>
The current value stored in this watcher.
getter/setter pairinherited

Methods

add(E value) bool
Adds value to this Watcher's value.
inherited
addAll(Iterable<E> elements) → void
Adds all elements to this Watcher's value.
inherited
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
any(bool test(E element)) bool
Converts each element to a String and concatenates the strings.
inherited
cast<R>() Set<R>
Provides a view of this Watcher's value as a set of R instances.
inherited
clear() → void
Creates a new set with the elements of this that are not in other.
inherited
contains(Object? value) bool
Whether value is in this Watcher's value.
inherited
containsAll(Iterable<Object?> other) bool
Whether this Watcher's value contains all the elements of other.
inherited
debounce(Duration duration, void action(Set<E> value)) VoidCallback
Registers a debounced callback which is invoked only after the notifier's value is stable for the specified duration.
inherited
deleteCache() Future<void>
deleteCache
inherited
difference(Set<Object?> other) Set<E>
Creates a new set with the elements of this that are not in other.
inherited
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
elementAt(int index) → E
Returns the indexth element.
inherited
every(bool test(E element)) bool
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value
inherited
expand<T>(Iterable<T> toElements(E element)) Iterable<T>
Expands each element of this Iterable into zero or more elements.
inherited
firstWhere(bool test(E element), {E orElse()?, bool refresh = true}) → E
The first element that satisfies the given predicate test.
inherited
fold<T>(T initialValue, T combine(T previousValue, E element)) → T
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.
inherited
followedBy(Iterable<E> other) Iterable<E>
Creates the lazy concatenation of this iterable and other.
inherited
forEach(void action(E element)) → void
Whether the collection contains an element equal to element.
inherited
intersection(Set<Object?> other) Set<E>
Creates a new set which is the intersection between this Watcher's value and other.
inherited
isEqual(Set<E> other) bool
Compares two sets for element-by-element equality.
inherited
join([String separator = '']) String
Checks whether every element of this iterable satisfies test.
inherited
lastWhere(bool test(E element), {E orElse()?, bool refresh = true}) → E
The last element that satisfies the given predicate test.
inherited
lookup(Object? object) → E?
If an object equal to object is in this Watcher's value, return it.
inherited
map<T>(T toElement(E e)) Iterable<T>
The current elements of this iterable modified by toElement.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
onChange(void action(Set<E> value)) VoidCallback
Registers a callback to be invoked whenever the ValueNotifier's value changes.
inherited
read(dynamic data) Set<E>?
read
override
reduce(E combine(E value, E element)) → E
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.
inherited
refresh() → void
Rebuilds and trigger any listeners of any WatchValue or watch attached to that Watcher.
inherited
remove(Object? value) bool
Removes value from this Watcher's value.
inherited
removeAll(Iterable<Object?> elements) → void
Removes each element of elements from this Watcher's value.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeWhere(bool test(E element)) → void
Removes all elements of this Watcher's value that satisfy test.
inherited
retainAll(Iterable<Object?> elements) → void
Removes all elements of this Watcher's value that are not elements in elements.
inherited
retainWhere(bool test(E element)) → void
Removes all elements of this Watcher's value that fail to satisfy test.
inherited
setWithoutNotify(Set<E> newValue) → void
inherited
singleWhere(bool test(E element), {E orElse()?, bool refresh = true}) → E
The single element that satisfies test.
inherited
skip(int count) Iterable<E>
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value
inherited
skipWhile(bool test(E value)) Iterable<E>
Checks whether every element of this iterable satisfies test.
inherited
startCaching() → void
startCaching
inherited
stopCaching() → void
stopCaching
inherited
take(int count) Iterable<E>
Creates a lazy iterable of the count first elements of this iterable.
inherited
takeWhile(bool test(E value)) Iterable<E>
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.
inherited
toList({bool growable = true, bool refresh = true}) List<E>
Checks whether any element of this iterable satisfies test.
inherited
toSet() Set<E>
Removes all elements from this Watcher's value.
inherited
toString() String
A string representation of this object.
inherited
union(Set<E> other) Set<E>
Creates a new set which contains all the elements of this Watcher's value and other.
inherited
updateIf(bool condition(Set<E>), Set<E> newValue) → void
Updates the ValueNotifier's value to newValue if condition returns true.
inherited
updateOnAction<R>(R action()) → R
Will notifyListeners after a specific action has been made, and optionally return a result R of certain type.
inherited
where(bool test(E element)) Iterable<E>
Creates a new lazy Iterable with all elements that satisfy the predicate test.
inherited
whereType<T>() Iterable<T>
Creates a new lazy Iterable with all elements that have type T.
inherited
write(Set<E> value) → dynamic
write
override

Operators

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