QueryScopedValueState<TResult, TRef extends Ref, TScopedValue extends QueryScopedValue<TResult, TRef>> class abstract

State created by ScopedValue.

initValue], didUpdateValue, deactivate, and dispose are executed for each lifecycle of create, update, deactivate, and destroy.

After it is destroyed, disposed will be true.

You can get the ScopedValue of the creation source at value.

After ScopedValue is updated, value is updated.

You can get TResult at build.

Execute setState to update the associated widget.

By specifying ref, you can obtain a Ref that can be referenced by a child element.

ScopedValueで作成されるステート。

作成、更新、非有効化、破棄のライフサイクルごとにinitValuedidUpdateValuedeactivatedisposeが実行されます。

破棄された後はdisposedtrueになります。

valueで作成元のScopedValueを取得できます。

ScopedValueが更新された後はvalueが更新されます。

buildTResultを取得することができます。

setStateを実行すると関連付けられているウィジェットを更新することができます。

refを指定することで子要素で参照可能なRefを取得できます。

Inheritance
Available Extensions

Constructors

QueryScopedValueState()

Properties

autoDisposeWhenUnreferenced bool
Returns true if ScopedValue should be automatically discarded when it is no longer referenced by any widget.
no setterinherited
disposed bool
true after the value is discarded.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
ref QueryScopedValueRef<TRef>
If Ref is passed to ScopedValue, it returns a Ref that can be referenced by descendants.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → TScopedValue
Returns the TScopedValue of the creation source.
no setterinherited

Methods

build() → TResult
Builder to return TResult.
inherited
deactivate() → void
If the widget is monitored by a widget, it is executed when the monitored widget is destroyed or otherwise removed.
inherited
didUpdateDescendant() → void
The original ScopedValue is notified when a ScopedValue executed through the internal Ref is updated.
inherited
didUpdateValue(covariant TScopedValue oldValue) → void
Executed each time ScopedValue is called.
inherited
dispose() → void
Executed when the value is discarded.
inherited
equalsKeys(List<Object> keys1, List<Object> keys2) bool
Used to check for updates with keys when trying to update with setState in didUpdateValue.
inherited
initValue() → void
Executed when a value is created.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setState(VoidCallback callback) → void
Notify associated widgets of updates.
inherited
toString() String
A string representation of this object.
inherited

Operators

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