listTile ok

This commit is contained in:
Valentin CZERYBA 2024-06-26 21:46:51 +02:00
parent cf29b1d364
commit 10b8448917

View File

@ -87,25 +87,8 @@ class _MyHomePageState extends State<ListItemMenu> {
itemCount: posts.length,
itemBuilder: (context, index) {
final post = posts[index];
return Container(
color: Colors.grey.shade300,
margin: EdgeInsets.symmetric(vertical: 5, horizontal: 5),
padding: EdgeInsets.symmetric(vertical: 5, horizontal: 5),
height: 100,
width: double.maxFinite,
child: Row(
children: [
Text(
'${post.name!}\n\n',
style: Theme.of(context).textTheme.titleMedium,
),
Text(
'${post.place!}',
style: Theme.of(context).textTheme.titleSmall,
),
],
),
);
return ListTile(
title: Text('${post.name!}'), subtitle: Text('${post.place!}'));
},
);
}