feat: update recipe detail screen to display image as background only

This commit is contained in:
Nils-Johan Gynther
2026-04-24 13:00:26 +02:00
parent 0cc56d65b7
commit a39640d4ea
@@ -152,19 +152,7 @@ class _RecipeBody extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (recipe.imageUrl != null) // Bilden visas endast som bakgrund i detaljvyn
ClipRRect(
borderRadius: BorderRadius.circular(12),
child: AspectRatio(
aspectRatio: 16 / 9,
child: Image.network(
recipe.imageUrl!,
fit: BoxFit.cover,
errorBuilder: (_, __, ___) => const SizedBox.shrink(),
),
),
),
if (recipe.imageUrl != null) const SizedBox(height: 20),
Text(recipe.title, style: theme.textTheme.headlineSmall), Text(recipe.title, style: theme.textTheme.headlineSmall),
if (recipe.description != null) ...[ if (recipe.description != null) ...[
const SizedBox(height: 8), const SizedBox(height: 8),