title: How to get data from firestore document fields in flutter?
body: <p>I'm trying to test firestore in my flutter-app but I can't really load the data as expected.</p>
  
  <p>This is how I get the data:</p>
  
  <pre><code> Firestore.instance
          .collection('Test')
          .document('test')
          .get()
          .then((DocumentSnapshot ds) {
        // use ds as a snapshot
  
        print('Values from db: $ds');
      });
  </code></pre>
  
  <p>And print-statement output: flutter: Values from db: Instance of 'DocumentSnapshot'.</p>
  
  <p>I also tried following, without success:</p>
  
  <pre><code>Firestore.instance.collection('Test').document('test').get().then((data) {
    // use ds as a snapshot
  
    if (data.documentID.length &gt; 0) {
      setState(() {
        stackOver = data.documentID;
        print(stackOver);
      });
    }
  });
  </code></pre>
  
  <p>Output here is only the documentID-name..</p>
  
  <p>So, how could I get the field-values from firestore?</p>
  
  <p>Best regards!</p>