ScopedValueContainer class

Container object for storing ScopedValue.

It is usually called via ScopedValueListener.

A database of ScopedValue is maintained internally, and the corresponding ScopedValueState can be read and edited by getScopedValueState.

It inherits from ChangeNotifier and can monitor changes in its contents.

The contents cannot be changed directly, but can be viewed at data.

ScopedValueを保存するためのコンテナオブジェクト。

通常はScopedValueListenerを介して呼び出されます。

内部にScopedValueのデータベースを保持しており、getScopedValueStateScopedValueに対応するScopedValueStateを読込み編集を加えることが可能です。

ChangeNotifierを継承しており、中身の変更を監視できます。

中身は直接変更することができませんがdataで中身を確認することが可能です。

Inheritance
Available Extensions

Constructors

ScopedValueContainer()
Container object for storing ScopedValue.

Properties

data Map<String, ScopedValueState<dynamic, ScopedValue>>
It is possible to check the contents of ScopedValueContainer.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
clear() → void
The contents of ScopedValueContainer are discarded and reset once.
dispose() → void
Called when ScopedValueContainer is destroyed.
override
getAlreadyExistsScopedValueState<TResult, TScopedValue extends ScopedValue<TResult>>({Object? name, void onUpdate(ScopedValueState<TResult, TScopedValue> state)?}) ScopedValueState<TResult, ScopedValue<TResult>>?
Get the ScopedValueState associated with the TScopedValue already stored in the ScopedValueContainer.
getScopedValueState<TResult, TScopedValue extends ScopedValue<TResult>>(TScopedValue provider(), {void onInit(ScopedValueState<TResult, TScopedValue> state)?, void onUpdate(ScopedValueState<TResult, TScopedValue> state)?, Object? name, ScopedLoggerScope? scope, String? managedBy, List<LoggerAdapter> loggerAdapters = const []}) ScopedValueState<TResult, ScopedValue<TResult>>
By passing a callback that returns TScopedValue to provider, it creates a state for that ScopedValue and performs the appropriate processing, returning ScopedValueState.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
remove(ScopedValueState<dynamic, ScopedValue> state) → void
If state exists in ScopedValueContainer, it is discarded and deleted.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
reset() → void
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

primary ScopedValueContainer
ScopedValueContainer common to all applications.
no setter