Created
October 11, 2021 15:28
-
-
Save vijayinyoutube/d4dc18c58d2a37ac8afe206305c47656 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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