title: the way of dealing with querysnapshot according to the size of snapshot?
body: <p>Hi I am now trying to get <code>Stream&lt;List&lt;Post&gt;&gt;</code> with <code>fetchAllPosts</code> function.</p>
  <p><code>toPosts</code> is a Transformer that turns QuerySnapshot into a Stream&lt;List&gt;.</p>
  <pre><code>// firebase_provider.dart
  
    Stream&lt;List&lt;Post&gt;&gt; fetchAllPosts() {
      return _firestore
          .collection('Posts')
          .orderBy('commenttime', descending: true)
          .snapshots()
          .transform(toPosts);
    }
  </code></pre>
  <p>This Stream&lt;List&gt; value will be used as a ListView within the StreamProvider in <code>feed_page.dart</code></p>
  <pre><code>// feed_page.dart
  
    Widget build(BuildContext context) {
      return StreamProvider&lt;List&lt;Post&gt;&gt;.value(
        value: firestoreProvider.fetchAllPosts()
  </code></pre>
  <p>However, if the snapshot is empty, I want to handle it differently in feed_page.dart(not in ListView)</p>
  <p>How should I handle this? The following method is what I've tried, but I'm not sure what to put in the last else statement in this case. Or I think there will be a better way</p>
  <pre><code>  Stream&lt;List&lt;Post&gt;&gt; fetchAllPosts2() {
      if (_firestore
              .collection(COLLECTION_POSTS)
              .orderBy(KEY_POSTTIME, descending: true)
              .snapshots()
              .length
              .toString() !=
          &quot;0&quot;) {
        return _firestore
            .collection(COLLECTION_POSTS)
            .orderBy(KEY_POSTTIME, descending: true)
            .snapshots()
            .transform(toPosts);
      } else {
        return ???????????;
      }
    }
  </code></pre>
  <p>Help me plz ;-)</p>