title: Flutter & Firebase : How do I get a specific field from a specific document into a stream?
body: <p>I have been trying to get a specific field from a specific document into a stream. But I always got null. How do I fix this?</p>
  <p>Function</p>
  <pre><code>Stream&lt;List&lt;String&gt;&gt; getError() {
      DocumentReference errorReference =
          appSettingCollection.document('report_error');
  
      final Stream&lt;DocumentSnapshot&gt; snapshots = errorReference.snapshots();
  
      return snapshots.map((doc) {
        //print(doc.data['types']);
        return doc.data['types'];
      });
    }
  </code></pre>
  <p>Main</p>
  <pre><code>return StreamBuilder&lt;List&lt;String&gt;&gt;(
          stream: User_DatabaseService().getError(),
          builder: (context, snapshot) {
            
            final List&lt;String&gt; errorTypes = snapshot.data;
            print('In Error Report : $errorTypes'); // I got null??? But why?
  ///--------
  </code></pre>
  <p>}}</p>