ComponentContext class
A ComponentContext is the interface for component to the Deact API. It is provied to the component, when it is rendered.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- locationString → String
-
Returns a string prepresentation of the location of
the component of this context.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
effect(
String name, Effect effect, {Iterable< State> ? dependsOn}) → void -
Introduces an effect that will be called, if the
component mounts (first time rendered) and if one
of the states in
dependsOn
has changed. -
globalRef<
R> (String name) → Ref< R> - Returns a state provided by a GlobalRefProvider.
-
globalState<
S> (String name) → State< S> - Returns a state provided by a GlobalStateProvider.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
ref<
T> (String name, T initialValue, {bool global = false}) → Ref< T> -
Creates a reference with the given
name
andintialValue
. -
refProvided<
T> (String name, InitialValueProvider< T> initialValueProvider, {bool global = false}) → Ref<T> -
Creates a reference with the given
name
and the result of a call toinitialValueProvider
. -
scheduleRerender(
{bool completeTree = false}) → void - Schedules a rerender of the component and all its children.
-
state<
T> (String name, T initialValue, {bool global = false}) → State< T> -
Creates a state with the given
name
andintialValue
. This state is local to the component. -
stateProvided<
T> (String name, InitialValueProvider< T> initialValueProvider, {bool global = false}) → State<T> -
Creates a state with the given
name
and the result of a call toinitialValueProvider
. This state is local to the component. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited