title: The method '[]' was called on null. Flutter?
body: <p><strong>My futurebuilder is occure error above anyone have any solution The relevant error-causing widget was:
  FutureBuilder ..........................................................................................................................................................................................................................................................................
  ..........................</strong></p>
  <pre><code>noti.dart
            Widget build(BuildContext context) {
              return FutureBuilder(
                  future: postReference
                      .document(userId)
                      .collection(&quot;usersPosts&quot;)
                      .document(postId)
                      .get(),
                  builder: (context, datasnapshot) {
                    if (!datasnapshot.hasData) {
                      return circularProgress();
                    }
                    Post post = Post.fromDocument(datasnapshot.data);
                    return Center(
                      child: Scaffold(
                        appBar: header(context, strTitle: post.description),
                        body: ListView(
                          children: &lt;Widget&gt;[
                            Container(
                              child: post,
                            ),
                          ],
                        ),
                      ),
                    );
                  });
  
  
      Post.dart
  
  class Post extends StatefulWidget {
    final String postId;
    final String ownerId;
    // final String timestamp;
    final dynamic likes;
    final String username;
    final String description;
    final String location;
    final String url;
    //
    Post({
      this.postId,
      this.ownerId,
      // this.timestamp,
      this.likes,
      this.username,
      this.description,
      this.location,
      this.url,
    });
  
    factory Post.fromDocument(DocumentSnapshot documentSnapshot) {
      return Post(
        postId: documentSnapshot[&quot;postId&quot;],
        ownerId: documentSnapshot[&quot;ownerId&quot;],
        likes: documentSnapshot[&quot;likes&quot;],
        // timestamp: documentSnapshot[&quot;timestamp&quot;],
        username: documentSnapshot[&quot;username&quot;],
        description: documentSnapshot[&quot;description&quot;],
        location: documentSnapshot[&quot;location&quot;],
        url: documentSnapshot[&quot;url&quot;],
      );
    }
  </code></pre>
  <p>The  post method that refers to it:</p>
  <pre><code>displayPost(context) {
    Navigator.push(
      context,
      MaterialPageRoute(
        builder: (context) =&gt; PostScreen(
          postId: postId,
          userId: userId,
        ),
      ),
    );
  }
  </code></pre>