I sign in my user through google, after successfully login. I wants to create document for each user inside user_details collection and the document name should be google id. But its auto generating document name.
Is there any way to create custom document in Firestore?
Thanks in Advance
// Store data in Firestore storeData(User user) async { DocumentReference documentRef = Firestore.instance.collection("user_details").document(user.id); Firestore.instance.runTransaction((transaction) async { await transaction.set(documentRef, user.toJson()); print("instance created"); _login.add(Result(Status.SUCCESS, "Login successful.", user)); }); }
await documentRef.setData(user.toJson());