UnitedState<T extends Object> class

A State object that will receive events dispatched by Washington.

Inheritance

Constructors

UnitedState(T initialValue, {bool isLoading = false})

Properties

error Object?
Used to indicate that something is wrong with this state.
no setter
hasError bool
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isLoading bool
Used to indicate if this state is currently loading.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T
The current value of this state.
no setter

Methods

addHandler<Tevent>(void handler(Tevent event)) → void
Add a handler to handle a specific event.
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispatch(Object event) → void
Make Washington dispatch an event globally.
dispose() → void
Clean up this state after use.
override
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
setState(T value, {bool isLoading = false, Object? error}) → void
Update the state.
toString() String
A string representation of this object.
inherited

Operators

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