Posts by Jorge Vieira • 116 points
1 post
-
0
votes1
answer96
viewsA: How to add values in a Firestore cloud collection in flutter Dart?
Declare the total variable outside of for and then add the values inside: int total = 0; for (DocumentSnapshot item in snapshot.documents) { var dados = item.data; total += dados['Valor'];…