Reputation: 173
I have this information "Tarifas" which is a map and I am trying to edit it in my Flutter application
but i haven't found a correct way to do it:
this is my data in Firestore
and this is the code that I have tried
Firestore.instance
.collection("parqueaderos")
.document(widget.idparking)
.updateData({
"tarifas['Carros']" : tCarros,
"tarifas['Motos']" : tMotos,
"tarifas['Bicicletas']" : tBicicletas,
});
I'm looking for an idea how to edit it
Upvotes: 0
Views: 288
Reputation: 1670
Try the following
Firestore.instance
.collection("parqueaderos")
.document(widget.idparking)
.updateData({
"tarifas.Carros" : tCarros,
"tarifas.Motos" : tMotos,
"tarifas.Bicicletas" : tBicicletas,
});
Upvotes: 2