title: Flutter, display text if firebase data is empty
body: <p>I am fetching data from firebase and displaying it on screen, initially, firebase data will be empty so, I wanna display the text<code>Press + to add data</code>. I tried doing it using if condition<code>snapshot.data!.docs ==null</code> but didn't work but it didn't work. Once the users add data to firebase, the stream builder will fetch it and display it and the text won't be there. How to achieve that.</p>
  <pre><code>StreamBuilder(
                      stream: FirebaseFirestore.instance
                          .collection('lender')
                          .doc(auth.currentUser!.email)
                          .collection('borrowers')
                          .snapshots(),
                      builder: (context, AsyncSnapshot&lt;QuerySnapshot&gt; snapshot) {
                        if (!snapshot.hasData) {
                          return const Center(
                              child: CircularProgressIndicator(
                            backgroundColor: Color(0xff8eacbb),
                          ));
                        }
                        if (snapshot.data!.docs ==null) {
                          return Text(
                            'Press + to add data',
                            style: TextStyle(fontSize: 20),
                          );
                        } else {
                          return ListView(
                              children: snapshot.data!.docs.map((data) {
                            return BorrowerCard(BorrowerName: data['Name']);
                          }).toList());
                        }
                      },
                    )
  </code></pre>
  <p>I also tried displaying the text instead of the <code>CircularProgressIndicator</code> but the text was displayed only for a few seconds, but I want it to display until the user adds data.</p>