ModelAdapterScope constructor
const
ModelAdapterScope({
- Key? key,
- required Widget child,
- required ModelAdapter adapter,
Widget for setting ModelAdapter.
You can set a child widget in child and an adapter for use in adapter.
You can get the nearest ancestor adapter from ModelAdapterScope.of.
By passing the adapter obtained here to CollectionModelQuery or DocumentModelQuery, it is possible to change the internal processing of the model.
ModelAdapterを設定するためのウィジェットです。
childに子のウィジェットを設定し、adapterに利用するためのアダプターを設定できます。
ModelAdapterScope.ofから近い先祖のadapterを取得することができます。
ここで設定したadapterをCollectionModelQueryやDocumentModelQueryに渡すことでモデルの内部処理を変更することが可能です。
Implementation
const ModelAdapterScope({
super.key,
required this.child,
required this.adapter,
});