SetNotifier<T> class
A set notifier class that allows mutable updates and notifies listeners of changes.
- Inheritance
-
- Object
- Listenable
- ValueListenable<
Set< T> > - SetListenable<
T> - SetNotifier
- Implemented types
-
- Set<
T>
- Set<
- Mixed-in types
- Available extensions
Constructors
-
SetNotifier([Set<
T> set = const {}]) - Constructs a SetNotifier with an initial set.
Properties
- disabled → bool
-
Available on Set<
Whether the widget is in a disabled state.WidgetState> , provided by the WidgetStateExtension extensionno setter - error → bool
-
Available on Set<
Whether the widget is in an error state.WidgetState> , provided by the WidgetStateExtension extensionno setter - first → T
-
The first element.
no setterinherited
- firstOrNull → T?
-
Available on Iterable<
The first element of this iterator, orT> , provided by the IterableExtensions extensionnullif the iterable is empty.no setter - focused → bool
-
Available on Set<
Whether the widget is in a focused state.WidgetState> , provided by the WidgetStateExtension extensionno setter - hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether the object has listeners.
no setterinherited
- hovered → bool
-
Available on Set<
Whether the widget is in a hovered state.WidgetState> , provided by the WidgetStateExtension extensionno setter -
indexed
→ Iterable<
(int, T)> -
Available on Iterable<
Pairs of elements of the indices and elements of this iterable.T> , provided by the IterableExtensions extensionno setter - isEmpty → bool
-
Whether this collection has no elements.
no setterinherited
- isNotEmpty → bool
-
Whether this collection has at least one element.
no setterinherited
-
iterator
→ Iterator<
T> -
An iterator that iterates over the elements of this set.
no setteroverride
- last → T
-
The last element.
no setterinherited
- lastOrNull → T?
-
Available on Iterable<
The last element of this iterable, orT> , provided by the IterableExtensions extensionnullif the iterable is empty.no setter - length → int
-
The number of elements in this Iterable.
no setteroverride
-
nonNulls
→ Iterable<
T> -
Available on Iterable<
The non-T?> , provided by the NullableIterableExtensions extensionnullelements of this iterable.no setter - pressed → bool
-
Available on Set<
Whether the widget is in a pressed state.WidgetState> , provided by the WidgetStateExtension extensionno setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selected → bool
-
Available on Set<
Whether the widget is in a selected state.WidgetState> , provided by the WidgetStateExtension extensionno setter - single → T
-
Checks that this iterable has only one element, and returns that element.
no setterinherited
- singleOrNull → T?
-
Available on Iterable<
The single element of this iterator, orT> , provided by the IterableExtensions extensionnull.no setter -
value
→ Set<
T> -
The current value of the object. When the value changes, the callbacks
registered with addListener will be invoked.
no setteroverride
-
wait
→ Future<
List< T> > -
Available on Iterable<
Waits for futures in parallel.Future< , provided by the FutureIterable extensionT> >no setter
Methods
-
add(
T value) → bool -
Adds
valueto the set.override -
addAll(
Iterable< T> values) → void -
Adds all
elementsto this set.override -
addChangeListener(
SetChangeListener< T> listener) → void -
Adds a
listenerto be notified of changes.override -
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object notifies its listeners.
override
-
any(
bool test(T element)) → bool -
Checks whether any element of this iterable satisfies
test.inherited -
asNameMap(
) → Map< String, T> -
Available on Iterable<
Creates a map from the names of enum values to the values.T> , provided by the EnumByName extension -
buildSeparator(
ValueGetter< T> separator) → Iterable<T> -
Available on Iterable<
Joins iterable items with dynamically built separators.T> , provided by the IterableExtension extension -
byName(
String name) → T -
Available on Iterable<
Finds the enum value in this list with nameT> , provided by the EnumByName extensionname. -
cast<
R> () → Set< R> -
Provides a view of this set as a set of
Rinstances.override -
clear(
) → void -
Removes all elements from the set.
override
-
contains(
Object? element) → bool -
Whether the collection contains an element equal to
element.inherited -
containsAll(
Iterable< Object?> other) → bool -
Whether this set contains all the elements of
other.override -
defaultAddListener(
ChangeListener listener) → void -
Add a listener to the list of listeners.
inherited
-
defaultNotifyListeners(
Object? event) → void -
Notify all the listeners.
inherited
-
defaultRemoveListener(
ChangeListener listener) → void -
Remove a listener from the list of listeners.
inherited
-
difference(
Set< Object?> other) → Set<T> -
Creates a new set with the elements of this that are not in
other.override -
dispose(
) → void -
Disposes the object making it unusable for further operations and
releasing the resources.
inherited
-
elementAt(
int index) → T -
Returns the
indexth element.inherited -
elementAtOrNull(
int index) → T? -
Available on Iterable<
The element at positionT> , provided by the IterableExtensions extensionindexof this iterable, ornull. -
every(
bool test(T element)) → bool -
Checks whether every element of this iterable satisfies
test.inherited -
expand<
T> (Iterable< T> toElements(T element)) → Iterable<T> -
Expands each element of this Iterable into zero or more elements.
inherited
-
firstWhere(
bool test(T element), {T orElse()?}) → T -
The first element that satisfies the given predicate
test.inherited -
fold<
T> (T initialValue, T combine(T previousValue, T element)) → T -
Reduces a collection to a single value by iteratively combining each
element of the collection with an existing value
inherited
-
followedBy(
Iterable< T> other) → Iterable<T> -
Creates the lazy concatenation of this iterable and
other.inherited -
forEach(
void action(T element)) → void -
Invokes
actionon each element of this iterable in iteration order.inherited -
intersection(
Set< Object?> other) → Set<T> -
Creates a new set which is the intersection between this set and
other.override -
join(
[String separator = ""]) → String -
Converts each element to a String and concatenates the strings.
inherited
-
joinSeparator(
T separator) → Iterable< T> -
Available on Iterable<
Joins iterable items with a separator between each.T> , provided by the IterableExtension extension -
lastWhere(
bool test(T element), {T orElse()?}) → T -
The last element that satisfies the given predicate
test.inherited -
lookup(
Object? object) → T? -
If an object equal to
objectis in the set, return it.override -
map<
T> (T toElement(T 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(
SetChangeDetails< T> details) → void - Notifies listeners of changes.
-
reduce(
T combine(T value, T element)) → T -
Reduces a collection to a single value by iteratively combining elements
of the collection using the provided function.
inherited
-
remove(
Object? value) → bool -
Removes
valuefrom the set.override -
removeAll(
Iterable< Object?> elements) → void -
Removes each element of
elementsfrom this set.override -
removeChangeListener(
SetChangeListener< T> listener) → void -
Removes a
listenerfrom being notified of changes.override -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that the
object notifies.
override
-
removeWhere(
bool test(T element)) → void -
Removes all elements of this set that satisfy
test.override -
retainAll(
Iterable< Object?> elements) → void -
Removes all elements of this set that are not elements in
elements.override -
retainWhere(
bool test(T element)) → void -
Removes all elements of this set that fail to satisfy
test.override -
singleWhere(
bool test(T element), {T orElse()?}) → T -
The single element that satisfies
test.inherited -
skip(
int count) → Iterable< T> -
Creates an Iterable that provides all but the first
countelements.inherited -
skipWhile(
bool test(T value)) → Iterable< T> -
Creates an
Iterablethat skips leading elements whiletestis satisfied.inherited -
take(
int count) → Iterable< T> -
Creates a lazy iterable of the
countfirst elements of this iterable.inherited -
takeWhile(
bool test(T value)) → Iterable< T> -
Creates a lazy iterable of the leading elements satisfying
test.inherited -
toList(
{bool growable = true}) → List< T> -
Creates a List containing the elements of this Iterable.
inherited
-
toSet(
) → Set< T> -
Creates a Set containing the same elements as this iterable.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
union(
Set< T> other) → Set<T> -
Creates a new set which contains all the elements of this set and
other.override -
where(
bool test(T element)) → Iterable< T> -
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited