AppRef constructor

AppRef({
  1. ScopedValueContainer? scopedValueContainer,
  2. List<LoggerAdapter> loggerAdapters = const [],
})

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を利用可能です。テスト等でご利用ください。

Implementation

AppRef({
  ScopedValueContainer? scopedValueContainer,
  List<LoggerAdapter> loggerAdapters = const [],
})  : __scopedValueContainer = scopedValueContainer,
      _loggerAdapters = loggerAdapters {
  if (scopedValueContainer != null) {
    ScopedValueContainer._primary = scopedValueContainer;
  }
}