primary property

ModelAdapter primary

You can get the default adapter.

ModelAdapter.primary is automatically set through ModelAdapterScope executed at the top level.

If ModelAdapterScope is not running, RuntimeModelAdapter will be called.

デフォルトのアダプターを取得できます。

ModelAdapter.primaryはトップレベルで実行されたModelAdapterScopeを通して自動的に設定されます。

ModelAdapterScopeが実行されていない場合にはRuntimeModelAdapterが呼び出されます。

Implementation

static ModelAdapter get primary {
  assert(
    _primary != null,
    "ModelAdapter is not set. Place [ModelAdapterScope] widget closer to the root.",
  );
  return _primary ?? const RuntimeModelAdapter();
}