title: StreamBuilder Unexpected null value
body: <p>The data is successfully updated to firebase but the data does not show on screen. When I run the code, a red screen shows up saying &quot;unexpected null value&quot;. Here is the code.</p>
  <pre><code>child: StreamBuilder(
          stream: FirebaseFirestore.instance
              .collection(&quot;Users&quot;)
              .doc(FirebaseAuth.instance.currentUser.uid)
              .collection(&quot;Coins&quot;)
              .snapshots(),
          builder:
              (BuildContext context, AsyncSnapshot&lt;QuerySnapshot&gt; snapshot) {
            if (snapshot.data!.docs.length &gt; 0) {
              return ListView(
                  children: snapshot.data!.docs.map((document) {
                return Container(
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                    children: [
                      Text(&quot;Coin Name: ${document.id}&quot;),
                      Text(&quot;Amount owned: ${document.data()['Amount']}&quot;),
                    ],
                  ),
                );
              }).toList());
            }
            //  else {
            ConnectionState == ConnectionState.waiting;
            return Center(
              child: CircularProgressIndicator(),
            );
            // }
          },
        ),
  </code></pre>
  <p>Here is the error message.</p>
  <p>The following TypeErrorImpl was thrown building StreamBuilder(dirty, state:
  _StreamBuilderBaseState&lt;QuerySnapshot, AsyncSnapshot&gt;#1c684):
  Unexpected null value.</p>
  <p>The relevant error-causing widget was:
  StreamBuilder
  StreamBuilder:file:///C:/Users/user/OneDrive/Documents/flutter%20tutorial/authentication_page/lib/ui/home_page.dart:24:18</p>