I am adding some information in firebase cloud firestore using flutter.Now i need to add some more detail against nodes. like here is i am adding data to cloud firestore.
void _addData(){
Firestore.instance.runTransaction((Transaction transaction) async{
CollectionReference reference = Firestore.instance.collection('task');
await reference.add({
"email" : widget.email.toLowerCase(),
"title" : newtask,
"members" : members,
"note" : note,
});
});
Navigator.pop(context);
}
in this example i want to add some extra detail against the node Member.
i want list of members against this. i am confused how to do that.
i want to add node against node like this using FirebaseDatabase here is the code.... Firestore dose not allow collection against collection like firebaseDatabase child against child.
return FirebaseDatabase.instance
.reference()
.child(USERS)
.child(user.uid)
.update(update
);