Created
December 6, 2019 13:09
-
-
Save guilhermecarvalhocarneiro/eeb32dd4087a7679b83cf2fa38b0a236 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
buildListView() { | |
// Instânciando o Provider do Feed | |
FeedProvider _feedProvider = Provider.of<FeedProvider>(context); | |
return ListView.builder( | |
// Se adicionar um Controller não precisa setar o physics | |
itemCount: _feedProvider.getItens().length, | |
shrinkWrap: true, | |
physics: ClampingScrollPhysics(), | |
itemBuilder: (context, index) { | |
var feed = _feedProvider.getItens(); | |
var post = feed[index]; | |
// passando os dados para o Widget CardView | |
return feedCardView(post); | |
}, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment