SetNotifier<E> class
create a ValueNotifier of type Set, which reacts just like normal Set, but with notifier capabilities.
- Inheritance
-
- Object
- ChangeNotifier
- ValueNotifier<
Set< E> > - SetNotifier
- Implemented types
-
- Set<
E>
- Set<
- Available Extensions
Constructors
-
SetNotifier(Set<
E> initial)
Properties
- first → E
-
The first element.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isEmpty → bool
-
Whether this collection has no elements.
no setteroverride
- isNotEmpty → bool
-
Whether this collection has at least one element.
no setteroverride
-
iterator
→ Iterator<
E> -
An iterator that iterates over the elements of this ValueNotifier's value.
no setteroverride
- last → E
-
The last element.
no setteroverride
- length → int
-
The number of elements in this.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- single → E
-
Checks that this iterable has only one element, and returns that element.
no setteroverride
-
value
↔ Set<
E> -
The current value stored in this notifier.
getter/setter pairinherited
Methods
-
add(
E value) → bool -
Adds
value
to this ValueNotifier's value.override -
addAll(
Iterable< E> elements) → void -
Adds all
elements
to this ValueNotifier's value.override -
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.
override
-
cast<
R> () → Set< R> -
Provides a view of this ValueNotifier's value as a set of
R
instances.override -
clear(
) → void -
Removes all elements from this ValueNotifier's value.
override
-
contains(
Object? value) → bool -
Whether
value
is in this ValueNotifier's value.override -
containsAll(
Iterable< Object?> other) → bool -
Whether this ValueNotifier's value contains all the elements of
other
.override -
difference(
Set< Object?> other) → Set<E> -
Creates a new set with the elements of this that are not in
other
.override -
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
index
th element.override -
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
override
-
expand<
T> (Iterable< T> toElements(E element)) → Iterable<T> -
Expands each element of this Iterable into zero or more elements.
override
-
firstWhere(
bool test(E element), {E orElse()?, bool refresh = true}) → E -
The first element that satisfies the given predicate
test
.override -
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.
override
-
followedBy(
Iterable< E> other) → Iterable<E> -
Creates the lazy concatenation of this iterable and
other
.override -
forEach(
void action(E element)) → void -
Whether the collection contains an element equal to
element
.override -
intersection(
Set< Object?> other) → Set<E> -
Creates a new set which is the intersection between this ValueNotifier's value and
other
.override -
isEqual(
Set< E> other) → bool - Compares two sets for element-by-element equality.
-
join(
[String separator = '']) → String -
Checks whether every element of this iterable satisfies
test
.override -
lastWhere(
bool test(E element), {E orElse()?, bool refresh = true}) → E -
The last element that satisfies the given predicate
test
.override -
lookup(
Object? object) → E? -
If an object equal to
object
is in this ValueNotifier's value, return it.override -
map<
T> (T toElement(E e)) → Iterable< T> -
The current elements of this iterable modified by
toElement
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
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.
override
-
refresh(
) → void -
remove(
Object? value) → bool -
Removes
value
from this ValueNotifier's value.override -
removeAll(
Iterable< Object?> elements) → void -
Removes each element of
elements
from this ValueNotifier's value.override -
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 ValueNotifier's value that satisfy
test
.override -
retainAll(
Iterable< Object?> elements) → void -
Removes all elements of this ValueNotifier's value that are not elements in
elements
.override -
retainWhere(
bool test(E element)) → void -
Removes all elements of this ValueNotifier's value that fail to satisfy
test
.override -
singleWhere(
bool test(E element), {E orElse()?, bool refresh = true}) → E -
The single element that satisfies
test
.override -
skip(
int count) → Iterable< E> -
Reduces a collection to a single value by iteratively combining each
element of the collection with an existing value
override
-
skipWhile(
bool test(E value)) → Iterable< E> -
Checks whether every element of this iterable satisfies
test
.override -
take(
int count) → Iterable< E> -
Creates a lazy iterable of the
count
first elements of this iterable.override -
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.
override
-
toList(
{bool growable = true, bool refresh = true}) → List< E> -
Checks whether any element of this iterable satisfies
test
.override -
toSet(
) → Set< E> -
Creates a Set with the same elements and behavior as this
Set
.override -
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 ValueNotifier's value and
other
.override -
where(
bool test(E element)) → Iterable< E> -
Creates a new lazy Iterable with all elements that satisfy the
predicate
test
.override -
whereType<
T> () → Iterable< T> -
Creates a new lazy Iterable with all elements that have type
T
.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited