AggregateQuerySnapshot class

The results of executing an AggregateQuery.

Properties

count → int?
The result of the count aggregation (count() or AggregateField.count), or null when the query did not ask for it.
no setter
hashCode → int
The hash code for this object.
no setteroverride
query → AggregateQuery
The query that produced this snapshot.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

data() → Map<String, Object?>
All the results: keyed by the user-chosen aliases for a query made with Query.aggregateWithAliases, by the default alias of each aggregation (count, sum_<field>, average_<field>) otherwise.
get(AggregateField aggregateField) → Object?
The result of aggregateField. Throws an ArgumentError if the query did not ask for it.
getAverage(Object field) → double?
The result of AggregateField.average over field (a String or a FieldPath), or null when no document has a numeric value for the field.
getSum(Object field) → num?
The result of AggregateField.sum over field (a String or a FieldPath): an int for a sum of integers that fits in 64 bits, a double otherwise, or null (for example a sum over no numeric value).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
Two snapshots are equal when they aggregate the same query and hold the same results under the same names (as aggregateQuerySnapshotEqual of the JS SDK): the order the aggregations were asked in does not matter.
override