File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/firebase_snippets_app/lib/snippets Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -888,7 +888,7 @@ class FirestoreSnippets extends DocSnippet {
888
888
void aggregationQuery_sum () {
889
889
// [START sum_aggregate_collection]
890
890
db.collection ("cities" ).aggregate (sum ("population" )).get ().then (
891
- (res) => print (res.getAverage ("population" )),
891
+ (res) => print (res.getSum ("population" )),
892
892
onError: (e) => print ("Error completing: $e " ),
893
893
);
894
894
// [END sum_aggregate_collection]
@@ -902,7 +902,7 @@ class FirestoreSnippets extends DocSnippet {
902
902
.aggregate (sum ("population" ))
903
903
.get ()
904
904
.then (
905
- (res) => print (res.getAverage ("population" )),
905
+ (res) => print (res.getSum ("population" )),
906
906
onError: (e) => print ("Error completing: $e " ),
907
907
);
908
908
// [END sum_aggregate_query]
You can’t perform that action at this time.
0 commit comments