Skip to content

Instantly share code, notes, and snippets.

@rohankandwal
Created November 27, 2019 11:11
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 rohankandwal/5571cea767555d09e977e00df1fb2c4f to your computer and use it in GitHub Desktop.
Save rohankandwal/5571cea767555d09e977e00df1fb2c4f to your computer and use it in GitHub Desktop.
Showing widgets between ListView items in Flutter
@override
Widget build(BuildContext context) {
return ListView.separated(
padding: EdgeInsets.only(top: 8),
separatorBuilder: (context, index) => Icon(Icons.add),
itemBuilder: (BuildContext context, int index) {
return ListTile(
title: Text(list[index].title),
leading: Image.network(list[index].image_url),
subtitle: Text(list[index].subtitle),
);
},
itemCount: list.length,
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment