Skip to content

Instantly share code, notes, and snippets.

@shyvum
Last active December 8, 2019 22:16
Show Gist options
  • Save shyvum/13bbcb8d36b86ea7cb59eb9a19ffe9f1 to your computer and use it in GitHub Desktop.
Save shyvum/13bbcb8d36b86ea7cb59eb9a19ffe9f1 to your computer and use it in GitHub Desktop.
Widget _buildBody(BuildContext context) {
return StreamBuilder<QuerySnapshot>(
stream: Firestore.instance.collection('candidate').snapshots(),
builder: (context, snapshot) {
if (!snapshot.hasData) return LinearProgressIndicator();
return _buildList(context, snapshot.data.documents);
},
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment