so i\'ve read all the documentation everything about increment a counter in a Firestore database. I have this code
const admin = require(\"firebase-admin\");
co
Try with this: (this is my code and works for me)
var firebaseUser = await FirebaseAuth
.instance
.currentUser();
DocumentReference queri = Firestore.instance
.collection("users")
.document(firebaseUser.uid);
Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => LoginView()));
var loginSuccess = wait model.getdata(_inputCuit.text);
if (loginSuccess) {
queri.updateData({ "queries": FieldValue.increment(1)});}
The key area is the .increment()
method