title: How do you get the document id after adding document in Cloud Firestore in Dart
body: <p>Im using the following code to update a Cloud Firestore collection using Dart/Flutter.</p>
  
  <pre><code>  final docRef = Firestore.instance.collection('gameLevels');
    docRef.document().setData(map).then((doc) {
      print('hop');
    }).catchError((error) {
      print(error);
    });
  </code></pre>
  
  <p>I'm trying to get the documentID created when I add the document to the collection but the (doc) parameter comes back as null. I thought it was supposed to be a documentReference?</p>
  
  <p>Since it's null, I obviously can't use doc.documentID.</p>
  
  <p>What am I doing wrong?</p>