skip to Main Content

Time Stamp as key in firebase firestore document

I want to save data on Firebase Firestore where the key will be timestamp: await FirebaseFirestore.instance .collection("users") .doc(uid) .collection('data') .doc(device.id) .update({ DateTime.now().toString(): "${result['humidity']}_${result['tempInC']}" }); } What can be the possible reasons for this nested hierarchy as shown in the image:…

VIEW QUESTION

I want to be able to filter a field where I can do a batch.update on flutter Firestore

final batch = FirebaseFirestore.instance.batch(); var nycRef = FirebaseFirestore.instance.collection("FoodOrders").doc(); // I want to specify a field here like where() // e.g var nycRef = FirebaseFirestore.instance.collection("FoodOrders").where("MyId",isEqualTo: myId); batch.update(nycRef, {"Paid": true}); batch.commit(); But I get an error saying The argument type 'Query<Map<String, dynamic>>'…

VIEW QUESTION
Back To Top
Search