feat: enhance product picker with searchable bottom sheet and improve recipe list item layout

This commit is contained in:
Nils-Johan Gynther
2026-04-25 07:31:28 +02:00
parent 46de546f9f
commit 5a85bd4526
3 changed files with 128 additions and 12 deletions
@@ -71,15 +71,42 @@ class RecipesScreen extends ConsumerWidget {
itemCount: recipes.length,
itemBuilder: (context, index) {
final recipe = recipes[index];
return ListTile(
leading: recipe.imageUrl != null
? CircleAvatar(
backgroundImage: NetworkImage(recipe.imageUrl!),
)
: const CircleAvatar(child: Icon(Icons.restaurant)),
title: Text(recipe.title),
subtitle: Text(recipe.description ?? ''),
return InkWell(
onTap: () => context.push('/recipes/${recipe.id}'),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 12, vertical: 6),
child: Row(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(6),
child: recipe.imageUrl != null
? Image.network(
recipe.imageUrl!,
width: 72,
height: 72,
fit: BoxFit.cover,
)
: Container(
width: 72,
height: 72,
color: Colors.grey[200],
child: const Icon(Icons.restaurant,
size: 32),
),
),
const SizedBox(width: 12),
Expanded(
child: Text(
recipe.title,
style: Theme.of(context).textTheme.titleMedium,
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
),
],
),
),
);
},
);