ListTile(
title: Text('ListTile'),
isThreeLine: true,
subtitle: Text('Secondary text
Tertiary text'),
leading: Icon(Icons.label),
trailing: Text('Metadata'),
),
ListTile(
leading: const Icon(Icons.flight_land),
title: const Text("Trix's airplane"),
subtitle: const Text('The airplane is only in Act II.'),
onTap: () => print("ListTile")
)
// using card
Card(
elevation: 5,
child: ListTile(
leading: Icon(Icons.icecream),
title: Text('I like icecream'),
subtitle: Text('Icream is good for health'),
trailing: Icon(Icons.food_bank),
),
),
// using ListView.builder
ListView.builder(
itemCount: dummyList.length,
itemBuilder: (context, index) => Card(
elevation: 6,
margin: EdgeInsets.all(10),
child: ListTile(
leading: CircleAvatar(
child: Text(dummyList[index]["id"].toString()),
backgroundColor: Colors.purple,
),
title: Text(dummyList[index]["title"]),
subtitle: Text(dummyList[index]["subtitle"]),
trailing: Icon(Icons.add_a_photo),
),
),
)
Card(
elevation: 5,
child: ListTile(
leading: Icon(Icons.icecream),
title: Text('I like icecream'),
subtitle: Text('Icream is good for health'),
trailing: Icon(Icons.food_bank),
),
),
ListTile(
tileColor: Colors.white,
leading: Image(
image: NetworkImage(
'https://jardin-secrets.com/image.php?/12435/photo-dracaena-fragrans_krzysztof-ziarnek.jpg'),
),
title: Text("Dragonnier"),
subtitle: Text("Dracaena"),
isThreeLine: true,
trailing: Icon(Icons.more_vert)
),