title: how can i get firestore collection and subcollection in flutter
body: <p>Thank you for reading my question.
  My English may not be good enough before I ask you a question.</p>
  <p>this my firestore structure
  <a href="https://i.stack.imgur.com/WuV9M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WuV9M.png" alt="this my firestore structure" /></a>
  <a href="https://i.stack.imgur.com/ja4LP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ja4LP.png" alt="this my firestore structure" /></a></p>
  <p>I'm using a flutter and I have to bring the product collection and subcollection image together from the FireStore.</p>
  <p>I succeeded get data, but I don't know how to use it as a streambuilder.</p>
  <pre><code>FirebaseFirestore.instance
                    .collection(&quot;products&quot;)
                    .get()
                    .then((value) async =&gt; {
                          for (DocumentSnapshot document in value.docs)
                            {
                              log(document.data().toString()),
                              await document.reference
                                  .collection(&quot;images&quot;)
                                  .get()
                                  .then((value) =&gt; {
                                        for (DocumentSnapshot document
                                            in value.docs)
                                          {
                                            log(document.data().toString()),
                                          }
                                      }),
                            }
                        });
  </code></pre>
  <p>code run log result
  <a href="https://i.stack.imgur.com/866W2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/866W2.png" alt="enter image description here" /></a></p>
  <p>I looked for it for three days, but I couldn't find the answer.
  Please reply.</p>
  <p>Have a nice day. Thank you.</p>