average static method
Query to output the average value of the field key
of the documents in the collection.
コレクションのドキュメントのkey
のフィールドの平均値を出力するためのクエリ。
Implementation
static ModelAggregateQuery<AsyncAggregateValue<double>> average(String key) {
return ModelAggregateQuery<AsyncAggregateValue<double>>._(
key: key,
type: ModelAggregateQueryType.average,
onCreate: (query, collection, onFinished) {
return AsyncAggregateValue<double>._(
query: query,
collection: collection,
onFinished: onFinished,
);
},
);
}