Last active
February 19, 2019 07:28
-
-
Save redbluenat/99807fd55cfca7dae4a698b32dc8a2e0 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
return new ListView.builder( | |
itemBuilder: (BuildContext context, int index) { | |
var beer = beers[index]; | |
return new Card( | |
child: new Column( | |
crossAxisAlignment: CrossAxisAlignment.stretch, | |
children: <Widget>[ | |
new Text("Name: " + beer['name'], | |
style: TextStyle( | |
fontWeight: FontWeight.bold, fontSize: 24)), | |
new Text("Country: " + beer['country'], | |
style: TextStyle( | |
fontWeight: FontWeight.normal, fontSize: 20)), | |
new Text("ABV: " + beer['abv'], | |
style: TextStyle( | |
fontWeight: FontWeight.normal, fontSize: 20)), | |
new Image.network(beer['image'], height: 200) | |
], | |
), | |
margin: EdgeInsets.only( | |
top: 10, bottom: 10, left: 10, right: 10)); | |
}, | |
itemCount: beers == null ? 0 : beers.length, | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment