ReactiveState class
ReactiveState is used to access reactive state controller of a given pre-registered type. This instance is reactive and is useful for updating all subscribers when the ReactiveController.setState method is called.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get<
T> (BuildContext context, [bool subscribe = true]) → T -
Provides a way to access a pre-registered reactive instance of type
T
.context
must be provided so the widget is subscribed and will update on all changes whenever the ReactiveController.setState method is called. -
getInjectable<
T> (BuildContext context, {bool subscribe = false}) → Injectable< T> -
getReactive<
T> (BuildContext context, {bool subscribe = false}) → ReactiveController< T> -
Provides a way to access a pre-registered reactive controller instance of type
T
. If thesubscribe
option is true, the widget is subscribed and will update on all changes whenever the ReactiveController.setState method is called. -
getRootInjectable<
T> () → Injectable< T> -
set<
T> (BuildContext context, [dynamic call(T)?]) → T -
Provides a shortcut for updating state of type
T
. This update can be mutable or immutable depending on if the settercall
method returns the same type asT
.