title: Fetch all the posts of all the users from Cloud Firestore
body: <p>I am building a <strong>Flutter</strong> app. Cloud firestore database structure is given in the picture. I want to get all the posts of all the users using a <strong><code>StreamBuilder</code></strong>. How can I do that? So far I have tried this : </p>
  
  <pre><code>Stream&lt;List&lt;PostModel&gt;&gt; jobs() {
      return usersCollection.snapshots().map((snapshot) {
        return snapshot.documents.map((doc) {
          doc['posts'].map((docu) {
            return PostModel.fromSnapshot(docu);
          });
        }).toList();
      });
    }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/3YVEV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3YVEV.jpg" alt="Firestore Database Structure"></a></p>