getAlreadyExistsScopedValue<TResult, TScopedValue extends ScopedValue<TResult> > method
TResult?
getAlreadyExistsScopedValue<TResult, TScopedValue extends ScopedValue<TResult> >({})
override
Obtains a TScopedValue
already stored in ScopedValueContainer.
Returns Null if TScopedValue
does not exist.
If TScopedValue
was saved with name
, specify the same name
.
If listen
is true
, then it should be associated with the widget to notify it of changes.
If recursive
is true
, the search is recursive from child to parent in the same scope.
ScopedValueState.setState, ScopedValueState.initValue and ScopedValueState.didUpdateValue are not executed.
ScopedValueContainerにすでに保存されているTScopedValue
を取得します。
TScopedValue
が存在しない場合はNullを返します。
name
を指定してTScopedValue
を保存していた場合、同じname
を指定してください。
listen
がtrue
の場合、ウィジェットに関連付けて変更を通知するようにします。
recursive
がtrue
な場合、同じスコープの子から親へと再帰的に検索します。
ScopedValueState.setStateやScopedValueState.initValue、ScopedValueState.didUpdateValueは実行されません。
Implementation
@override
TResult? getAlreadyExistsScopedValue<TResult,
TScopedValue extends ScopedValue<TResult>>({
Object? name,
bool listen = false,
bool recursive = true,
}) {
return _scopedValueContainer
.getAlreadyExistsScopedValueState<TResult, TScopedValue>(
name: name,
)
?.build();
}