AppRef class

ScopedValue in the scope of the application.

Since there is no object to monitor the status, we only read ScopedValue, but if we define the value globally, we can call it from any timing.

It is also required when placing the first AppScoped.

If scopedValueContainer is specified, your own ScopedValueContainer can be used. Please use it for testing, etc.

アプリケーションのスコープでScopedValueを取得することができます。

状態を監視する対象がないので、ScopedValueを読み込みするのみですが、グローバルで値を定義しておくとどのタイミングからでも呼ぶことが可能です。

最初にAppScopedを置く際にも必要になります。

scopedValueContainerを指定すると独自のScopedValueContainerを利用可能です。テスト等でご利用ください。

Implemented types
Available Extensions
Annotations

Constructors

AppRef({ScopedValueContainer? scopedValueContainer, List<LoggerAdapter> loggerAdapters = const []})
ScopedValue in the scope of the application.

Properties

hashCode int
The hash code for this object.
no setterinherited
loggerAdapters List<LoggerAdapter>
Adapter to define loggers.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Discard and clear all appscope states.
getAlreadyExistsScopedValue<TResult, TScopedValue extends ScopedValue<TResult>>({Object? name, bool listen = false, bool recursive = true}) → TResult?
Obtains a TScopedValue already stored in ScopedValueContainer.
override
getScopedValue<TResult, TScopedValue extends ScopedValue<TResult>>(TScopedValue provider(Ref ref), {void onInit(ScopedValueState<TResult, TScopedValue> state)?, void onUpdate(ScopedValueState<TResult, TScopedValue> state)?, bool listen = false, Object? name}) → TResult
listen does not work only for AppRef.getScopedValue. (setting listen to `true' does not redraw the monitored object)
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
toString() String
A string representation of this object.
inherited

Operators

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