state property
State
state
The current "state" of this Notifier.
Updating this variable will synchronously call all the listeners. Notifying the listeners is O(N) with N the number of listeners.
Updating the state will throw if at least one listener throws.
Implementation
State get state {
return _state;
}
void
state=(State value)
Implementation
set state(State value) {
_state = value;
final errors = <Object>[];
final stackTraces = <StackTrace?>[];
for (final listenerEntry in _listeners) {
try {
listenerEntry.listener(value);
} catch (error, stackTrace) {
errors.add(error);
stackTraces.add(stackTrace);
}
}
if (errors.isNotEmpty) {
throw NotifierListenerError._(errors, stackTraces, this);
}
}