Base interface for all observable state types in the compose_state package.
This interface extends Flutter's Listenable to provide change notification capabilities and defines the contract for accessing and modifying state values.
All state implementations should implement this interface to ensure consistent behavior and enable polymorphic usage.
- Inheritance
-
- Object
- Listenable
- ObservableState
- Implementers
- Available extensions
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDisposed → bool
-
Whether this state has been disposed and is no longer usable.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ T
-
The current value of the state.
getter/setter pair
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object notifies its listeners.
inherited
-
createSnapshot(
) → StateSnapshot< T> - Creates a snapshot of the current state.
-
dispose(
) → void - Disposes of this state and releases any resources.
-
equals(
T other) → bool - Checks if the given value is equal to the current state value.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that the
object notifies.
inherited
-
restoreFromTransaction(
StateSnapshot< T> snapshot) → void -
Available on ObservableState<
Restores state from a snapshot within a transaction context.T> , provided by the TransactionalStateExtension extension -
restoreSnapshot(
StateSnapshot< T> snapshot) → void - Restores the state from a previously created snapshot.
-
snapshotForTransaction(
) → StateSnapshot< T> -
Available on ObservableState<
Creates a snapshot of the current state for transaction purposes.T> , provided by the TransactionalStateExtension extension -
toString(
) → String -
A string representation of this object.
inherited
-
updateInTransaction(
void update()) → Future< void> -
Available on ObservableState<
Executes a state update within a transaction.T> , provided by the TransactionalStateExtension extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited