feat: update recipe detail screen to display image as background only
This commit is contained in:
@@ -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),
|
||||||
|
|||||||
Reference in New Issue
Block a user