listview flutter
ListView.builder(
itemCount: data.length,
itemBuilder: (context, index) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 1, horizontal: 4),
child: Card(
child: ListTile(
onTap: () {
print(data[index]);
},
title: Text(data[index].name),
leading: CircleAvatar(
backgroundImage:
AssetImage('assets/${data[index].avatar}'),
),
),
),
);
}),