model<TModel extends Listenable> method

TModel model<TModel extends Listenable>(
  1. ModelQueryBase<TModel> query
)

Retrieve the state-preserved TModel by passing the ModelQueryBase code generated by the builder.

ビルダーによりコード生成されたModelQueryBaseを渡すことにより状態を保持されたTModelを取得します。

final document = appRef.model(UserModel.document()); // Get the user document.
final collection = appRef.model(UserModel.collection()); // Get the user collection.

Implementation

TModel model<TModel extends Listenable>(
  ModelQueryBase<TModel> query,
) {
  return this.query(query);
}