StoreHook<T> class

Store hook for connecting to global state

Inheritance

Constructors

StoreHook(Store<T> _store, dynamic _onChange(), [String? _componentId, String? _componentType])
Create a store hook

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state → T
Get current state
no setter
store Store<T>
Get the store (for hook validation)
no setter

Methods

dispose() → void
Clean up the hook when component unmounts
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setState(T newState) → void
Update store state
toString() String
A string representation of this object.
inherited
updateState(T updater(T)) → void
Update store state with a function

Operators

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