ScopedValueState<TResult, TScopedValue extends ScopedValue<TResult>> 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.

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

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

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

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

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

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

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

Implementers
Available Extensions

Constructors

ScopedValueState()

Properties

autoDisposeWhenUnreferenced bool
Returns true if ScopedValue should be automatically discarded when it is no longer referenced by any widget.
no setter
disposed bool
true after the value is discarded.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → TScopedValue
Returns the TScopedValue of the creation source.
no setter

Methods

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

Operators

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