Created
November 22, 2022 04:01
-
-
Save LucasFebatis/89bdd301a9ebbb97ebbd0f8adab7eb86 to your computer and use it in GitHub Desktop.
Construindo uma lista em Flutter
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
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