title: How to get Firebase snapshots length?
body: <p>I've created an app with Firebase but I've got a problem, which is that I </p>
  
  <p>can't count the snapshot length in listview.builder.</p>
  
  <pre class="lang-dart prettyprint-override"><code>StreamBuilder(
          stream:
              _firestore.collection('/posts/${widget.uid}/comments').snapshots(),
          builder: (context, snapshot) {
            final data = snapshot.data.documents;
  
            if (!snapshot.hasData) {
              return SpinKitChasingDots(
                color: Colors.lightGreen,
              );
            }
            return ListView.builder(
              itemCount: snapshot.data.documents.length,//Here is the problem
              itemBuilder: (context, index) {
                return PostComment(
                  commentText: data[index]['commentText'],
                  userImage: data[index]['userImage'],
                  userName: data[index]['userName'],
                );
              },
            );
          },
        ),
  
  </code></pre>
  
  <p>When I run it gives me an error that it doesn't have actually a getter called length.</p>