I'm using StreamBuilder to populate a list view with Firebase data. This works fine but once I put my StreamBuilder in the field "children" of a new Column widget, list view is not visible anymore.
Here is my code to build my ListView :
Widget _buildBody(BuildContext context) {
return new StreamBuilder<QuerySnapshot>(
stream: Firestore.instance.collection('sessions').snapshots(),
builder: (context, snapshot) {
if (snapshot.data == null) return LinearProgressIndicator();
return _buildList(context, snapshot.data.documents);
},
);
}
Widget _buildList(BuildContext context, List<DocumentSnapshot> snapshot) {
return ListView(
padding: const EdgeInsets.only(top: 20.0),
children: snapshot.map((data) => _buildListItem(context, data)).toList(),
);
}
How can i fix that to use StreamBuilder in a Column widget ? (I'd like to add many other widgets next to the listView).