Skip to content

Instantly share code, notes, and snippets.

@vijayinyoutube
Created September 14, 2021 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vijayinyoutube/b5eac14c6a1cf61444b219f8f13178a4 to your computer and use it in GitHub Desktop.
Save vijayinyoutube/b5eac14c6a1cf61444b219f8f13178a4 to your computer and use it in GitHub Desktop.
FutureBuilder(
future: FireStoreDataBase().getData(),
builder: (context, snapshot) {
if (snapshot.hasError) {
return const Text(
"Something went wrong",
);
}
if (snapshot.connectionState == ConnectionState.done) {
dataList = snapshot.data as List;
return buildItems(dataList);
}
return const Center(child: CircularProgressIndicator());
},
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment