subcollection firestore flutter code example
Example: add to subcollection firestore flutter
final databaseReference = Firestore.instance;
databaseReference.collection('main collection name').document( unique id).collection('string name').document().setData(); // your answer missing **.document()** before setData