SetSignalMixin<E> mixin

A mixin that provides reactive set functionality.

This mixin implements all Set operations while maintaining reactivity. Any modification to the set will automatically notify subscribers. All mutating operations trigger change notifications.

Implemented types
Available extensions

Properties

first → E
The first element of the set.
no setteroverride
firstOrNull → T?

Available on Iterable<T>, provided by the IterableExtensions extension

The first element of this iterator, or null if the iterable is empty.
no setter
hashCode int
The hash code for this object.
no setterinherited
indexed Iterable<(int, T)>

Available on Iterable<T>, provided by the IterableExtensions extension

Pairs of elements of the indices and elements of this iterable.
no setter
isEmpty bool
Whether this set is empty.
no setteroverride
isNotEmpty bool
Whether this set is not empty.
no setteroverride
iterator Iterator<E>
Returns an iterator over the elements of this set.
no setteroverride
last → E
The last element of the set.
no setteroverride
lastOrNull → T?

Available on Iterable<T>, provided by the IterableExtensions extension

The last element of this iterable, or null if the iterable is empty.
no setter
length int
The number of elements in this set.
no setteroverride
nonNulls Iterable<T>

Available on Iterable<T?>, provided by the NullableIterableExtensions extension

The non-null elements of this iterable.
no setter
peek Set<E>
Gets the current value without establishing a reactive dependency.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
single → E
The single element of the set.
no setteroverride
singleOrNull → T?

Available on Iterable<T>, provided by the IterableExtensions extension

The single element of this iterator, or null.
no setter
value Set<E>
Gets the current value and establishes a reactive dependency.
no setterinherited
wait Future<List<T>>

Available on Iterable<Future<T>>, provided by the FutureIterable extension

Waits for futures in parallel.
no setter

Methods

add(E element) bool
Adds the given element to this set.
override
addAll(Iterable<E> other) → void
Adds all elements from the given iterable to this set.
override
any(bool test(E element)) bool
Returns true if any element satisfies the given test.
override
asNameMap() Map<String, T>

Available on Iterable<T>, provided by the EnumByName extension

Creates a map from the names of enum values to the values.
byName(String name) → T

Available on Iterable<T>, provided by the EnumByName extension

Finds the enum value in this list with name name.
cast<R>() Set<R>
Returns a view of this set as having R elements.
override
clear() → void
Removes all elements from the set.
override
contains(Object? element) bool
Returns true if the set contains the given element.
override
containsAll(Iterable<Object?> other) bool
Returns true if this set contains all elements in other.
override
difference(Set<Object?> other) Set<E>
Returns a new set with elements in this set that are not in other.
override
elementAt(int index) → E
Returns the element at the given index.
override
elementAtOrNull(int index) → T?

Available on Iterable<T>, provided by the IterableExtensions extension

The element at position index of this iterable, or null.
every(bool test(E element)) bool
Returns true if every element satisfies the given test.
override
expand<R>(Iterable<R> f(E element)) Iterable<R>
Expands each element into zero or more elements.
override
firstWhere(bool test(E element), {E orElse()?}) → E
Returns the first element that satisfies the given test.
override
fold<T>(T initialValue, T combine(T previousValue, E element)) → T
Reduces the set to a single value by iteratively combining elements.
override
followedBy(Iterable<E> other) Iterable<E>
Returns an iterable of this set followed by other.
override
forEach(void action(E element)) → void
Applies the given function to each element in the set.
override
get() Set<E>
Gets the current value and establishes a reactive dependency.
inherited
intersection(Set<Object?> other) Set<E>
Returns a new set containing elements present in both this set and other.
override
join([String separator = ""]) String
Joins all elements into a string separated by separator.
override
lastWhere(bool test(E element), {E orElse()?}) → E
Returns the last element that satisfies the given test.
override
lookup(Object? element) → E?
Returns the element equal to element, if present.
override
map<T>(T f(E element)) Iterable<T>
Returns an iterable with elements transformed by the given function.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify() → void
Manually notifies all subscribers that this value has changed.
inherited
reduce(E combine(E value, E element)) → E
Reduces the set to a single value using the given combine function.
override
remove(Object? element) bool
Removes the given element from the set.
override
removeAll(Iterable<Object?> other) → void
Removes all elements in other from this set.
override
removeWhere(bool test(E element)) → void
Removes all elements that satisfy the given test.
override
retainAll(Iterable<Object?> other) → void
Removes all elements not in other from this set.
override
retainWhere(bool test(E element)) → void
Removes all elements that do not satisfy the given test.
override
singleWhere(bool test(E element), {E orElse()?}) → E
Returns the single element that satisfies the given test.
override
skip(int n) Iterable<E>
Returns an iterable that skips the first n elements.
override
skipWhile(bool test(E element)) Iterable<E>
Returns an iterable that skips elements while test returns true.
override
take(int count) Iterable<E>
Returns an iterable with at most count elements.
override
takeWhile(bool test(E element)) Iterable<E>
Returns an iterable that takes elements while test returns true.
override
toIterableSignal() IterableSignal<E>

Available on Iterable<E>, provided by the JoltIterableExtension extension

Converts this iterable to a reactive iterable signal.
toList({bool growable = true}) List<E>
Returns a list containing the elements of this set.
override
toSet() Set<E>
Returns a new set containing the same elements as this set.
override
toSetSignal() SetSignal<E>

Available on Set<E>, provided by the JoltSetExtension extension

Converts this set to a reactive set signal.
toString() String
A string representation of this object.
inherited
union(Set<E> other) Set<E>
Returns a new set containing all elements in this set and other.
override
where(bool test(E element)) Iterable<E>
Returns an iterable containing elements that satisfy the given test.
override
whereType<T>() Iterable<T>
Returns an iterable containing only elements of type T.
override

Operators

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