I am trying to set my documentID manually in my flutter application but it keeps creating a new field inside my document named DocumentID. How do I set my documented?
final barcode = TextEditingController(); final price = TextEditingController(); final stock = TextEditingController(); final color = TextEditingController(); ///the above are textformfield controllers I use for the data input addData() { Map<String, dynamic> theData = { //"DocumentID" : barcode.text, "Color" : color.text, "Price" : price.text, "Stock" : stock.text, }; CollectionReference collectionReference = Firestore.instance.collection("products"); collectionReference.add(theData); } addID(){ DocumentReference dataID = Firestore.instance.document("products"); dataID.set(DocumentReference, barcode.text); } The data also displays only "" in my database when using the method addData: 
Below is mu adjusted code:
final barcode = TextEditingController(); final price = TextEditingController(); final stock = TextEditingController(); final color = TextEditingController(); addData() { Map<String, dynamic> theData = { "Color" : color.text, "Price" : price.text, "Stock" : stock.text, }; CollectionReference collectionReference = Firestore.instance.collection("products"); FirebaseFirestore.instance.collection("products").doc(barcode.text).set(theData); collectionReference.add(theData); } 
//"DocumentID" : barcode.text,probably wasn't commented