Skip to content

Instantly share code, notes, and snippets.

@vijayinyoutube
Created October 11, 2021 15:28
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/d4dc18c58d2a37ac8afe206305c47656 to your computer and use it in GitHub Desktop.
Save vijayinyoutube/d4dc18c58d2a37ac8afe206305c47656 to your computer and use it in GitHub Desktop.
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Firebase Demo"),
),
body: 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 buildShimmerItems();
},
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment