ScopeStateWithErrorNotifier<S extends Object> class ScopeNotifier

Inheritance
Implemented types
Available extensions

Constructors

ScopeStateWithErrorNotifier(S initialState)
Creates a notifier holding initialState and no error.

Properties

error Object
The error, when there is one.
no setteroverride
hasError bool
Whether the state carries an error.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace
The stack trace of error.
no setteroverride
state → S
The current state.
no setteroverride

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
asUnmodifiable() ScopeStateWithErrorModelView<S>
A view of this notifier that can be read and listened to, not set.
override
dispose() → void
Discards any resources used by the object.
inherited
listen(void callback()) ListenableSubscription

Available on Listenable, provided by the ListenableListenExtension extension

Listen to the Listenable.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
select<T extends Object?>(T selector(L listenable), void listener(L listenable, T value), {bool compare(T previous, T current)?}) ListenableSelectSubscription<T>

Available on L, provided by the ListenableSelectExtension extension

Listen to a specific value of the Listenable.
setError(Object error, StackTrace stackTrace) → void
Puts the model into the failed state and notifies the listeners.
shouldNotify(S previous, S current) bool
Whether a change from previous to current is worth notifying about.
inherited
toString() String
A string representation of this object.
inherited
update(S value) → void
Replaces the state, and puts down a failure the model was holding.
override

Operators

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