skip to Main Content

Unable to add data in Firebase Firestore

code for uploading data in firestore Console: "Document written with ID: undefined" try { console.log const docRef = addDoc(collection(db, "users"), { name: "Alan", //middle: "Mathison", //last: "Turing", //born: 1912 }); console.log('yyyyy'); console.log("Document written with ID: ", docRef.id); } catch (e)…

VIEW QUESTION

Error reading Firestore data from flutter

getData() async{ var result = await FirebaseFirestore.instance.collection('users').doc('documentId').get(); print(result['']); } @override void initState() { getData(); super.initState(); } In, if the value in result[''] is aa or 1aa, the data can be read, but if it is 1.aa, it cannot be read.…

VIEW QUESTION
Back To Top
Search