Skip to content

Instantly share code, notes, and snippets.

@LucasFebatis
Created November 22, 2022 04:01
Show Gist options
  • Save LucasFebatis/89bdd301a9ebbb97ebbd0f8adab7eb86 to your computer and use it in GitHub Desktop.
Save LucasFebatis/89bdd301a9ebbb97ebbd0f8adab7eb86 to your computer and use it in GitHub Desktop.
Construindo uma lista em Flutter
ListView buildList(List<SuperHero> list) {
return ListView.builder(
padding: const EdgeInsets.all(8),
itemCount: list.length,
itemBuilder: (BuildContext context, int index) {
return GestureDetector(
onTap: () => goToSuperHeroPage(list[index]),
child: SuperHeroCard(superHero: list[index]),
);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment