Created
November 27, 2019 11:11
-
-
Save rohankandwal/5571cea767555d09e977e00df1fb2c4f to your computer and use it in GitHub Desktop.
Showing widgets between ListView items in Flutter
This file contains hidden or 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
@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