title: Bad state: field does not exist within the DocumentSnapshotPlatform . It shows the getter was called on null
body: <p>The relevant error-causing widget was
  StreamBuilder. I've given the link of the project repo in github .</p>
  <pre><code>Widget build(BuildContext context) {
  return StreamBuilder(
    stream: FirebaseFirestore.instance
        .collection(&quot;/chats/2DGQmBssJ4sU6MVJZYc0/messages&quot;)
        .orderBy('createdAt', descending: true)
        .snapshots(),
    builder: (context, snapshot) {
      if (snapshot.connectionState == ConnectionState.waiting)
        Center(child: CircularProgressIndicator());
      final documents = snapshot.data.documents;
      return ListView.builder(
        reverse: true,
        itemCount: documents.length,
        itemBuilder: (context, index) {
          return MessageBubble(
              documents[index]['text'],
              documents[index]['userID'] == user.uid,
              documents[index]['userID'],
              documents[index]['imageurl']);
        },
      );
    },
  );
  </code></pre>
  <p>}
  }</p>
  <p><a href="https://github.com/muqaddir/firechat" rel="nofollow noreferrer">Github link of the project</a></p>