Skip to content

Instantly share code, notes, and snippets.

@Norbert515
Created February 15, 2018 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Norbert515/c4e5640fa65b38e5cf578a385bbd4227 to your computer and use it in GitHub Desktop.
Save Norbert515/c4e5640fa65b38e5cf578a385bbd4227 to your computer and use it in GitHub Desktop.
ListView
new Expanded(
child: new ListView.builder(
padding: new EdgeInsets.all(8.0),
itemCount: _items.length,
itemBuilder: (BuildContext context, int index) {
return new Card(
child: new Padding(
padding: new EdgeInsets.all(8.0),
child: new Row(
children: <Widget>[
_items[index].url != null? new Image.network(_items[index].url): new Container(),
new Flexible(
child: new Text(_items[index].title, maxLines: 10),
),
],
)
)
);
},
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment