Created
July 6, 2022 19:14
-
-
Save pawelsa/675ed5059b2e95da32fd2e07817641f7 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
Widget _buildBody(StreamData<List<ContentData>> streamData){ | |
return Stack( | |
children: [ | |
ListView.builder( | |
itemCount: streamData.data.length, | |
itemBuilder: (context, index) { | |
final item = streamData.data[index]; | |
return CardItem( | |
onTap: () => _onCardTap(context, item), | |
content: item, | |
width: size.width, | |
); | |
}, | |
), | |
if(streamData is LoadingData) | |
Align( | |
alignment: Alignment.center, | |
child: CircularProgressIndicator(), | |
), | |
], | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment