title: How to wrap a StreamBuilder class with a Column or ListView class in Flutter?
body: <p>I'm having a problem with my Flutter app, I have a class that returns only a StreamBuilder, it works well, displaying data from Cloud Firestore. But, when I try to wrap this class in a Column or ListView class, it just doesn't show anything.</p>
  
  <p>I need this to display the name of the current page. And the AppBar class is already with the app name, so I can't use this too.</p>
  
  <p>Does anyone know how I can wrap this and keep it running?</p>
  
  <p>A sample code working</p>
  
  <pre><code>  class NewCardsList extends StatelessWidget {
  
    @override
    Widget build(BuildContext context) {
      return new StreamBuilder&lt;QuerySnapshot&gt;(
        stream: firestore.collection('cards_list').snapshots(),
        builder: (BuildContext context, AsyncSnapshot&lt;QuerySnapshot&gt; snapshot) {
          if (!snapshot.hasData) return const Text('Connecting...');
          final int cardLength = snapshot.data.documents.length;
          return new ListView.builder(
            itemCount: cardLength,
            itemBuilder: (int index) {
              final DocumentSnapshot _card= snapshot.data.documents[index];
              return new ListTile(
                title: new Text(_card['title']),
                subtitle: new Text(_card['description']),
              );
            },
          );
        },
      );
    }
  }
  </code></pre>
  
  <p>A sample code not working</p>
  
  <pre><code>class NewCardsList extends StatelessWidget {
  
        @override
        Widget build(BuildContext context) {
          return new Column(
            children: &lt;Widget&gt; [
              Text("Your Card List"),
              StreamBuilder&lt;QuerySnapshot&gt;(
            stream: firestore.collection('cards_list').snapshots(),
            builder: (BuildContext context, AsyncSnapshot&lt;QuerySnapshot&gt; snapshot) {
              if (!snapshot.hasData) return const Text('Connecting...');
              final int cardLength = snapshot.data.documents.length;
              return new ListView.builder(
                itemCount: cardLength,
                itemBuilder: (int index) {
                  final DocumentSnapshot _card= snapshot.data.documents[index];
                  return new ListTile(
                    title: new Text(_card['title']),
                    subtitle: new Text(_card['description']),
                  );
                },
              );
            },
          ]));
        }
      }
  </code></pre>