title: Flutter Firestore QuerySnapshot has no instance of getter 'document
body: <p>I'm using this to get a list of messages from the firestore database, however, it's giving me an error: </p>
  
  <p><strong>flutter: The following NoSuchMethodError was thrown building:
  flutter: Class 'QuerySnapshot' has no instance getter 'document'.
  flutter: Receiver: Instance of 'QuerySnapshot'
  flutter: Tried calling: document</strong></p>
  
  <p>The code that I'm using is :</p>
  
  <pre><code>StreamBuilder(
                  stream: Firestore.instance
                      .collection('messages')
                      .document(groupId)
                      .collection(groupId)
                      .orderBy('timestamp', descending: true)
                      .snapshots(),
                  builder: (BuildContext context, AsyncSnapshot snapshot) {
                    if (!snapshot.hasData) {
                      return Center(
                        child: CircularProgressIndicator(),
                      );
                    } else {
                      listMessage = snapshot.data.documents;
                      return ListView.builder(
                        padding: EdgeInsets.all(10.0),
                        itemBuilder: (context, index) =&gt;
                            buildItem(index, snapshot.data.document[index]),
                        itemCount: snapshot.data.documents.length,
                        reverse: true,
                        controller: scrollController,
                      );
                    }
                  },
                ),
  </code></pre>
  
  <p>I'm new to Firestore and noSQL can anyone help here please?</p>