feat: update technical documentation and remove unnecessary logout icon from profile screen

This commit is contained in:
Nils-Johan Gynther
2026-04-24 08:17:48 +02:00
parent 2781b29f5a
commit 931336f048
4 changed files with 34 additions and 9 deletions
@@ -22,6 +22,11 @@ class RecipeDetailScreen extends ConsumerWidget {
return Scaffold(
appBar: AppBar(
title: Text(recipeAsync.maybeWhen(data: (d) => d, orElse: () => null)?.title ?? 'Recept'),
leading: IconButton(
icon: const Icon(Icons.arrow_back),
onPressed: () => context.go('/recipes'),
tooltip: 'Tillbaka till receptlistan',
),
actions: recipeAsync.maybeWhen(data: (d) => d, orElse: () => null) == null
? []
: [
@@ -40,7 +45,28 @@ class RecipeDetailScreen extends ConsumerWidget {
message: mapErrorToUserMessage(error, context),
onRetry: () => ref.invalidate(recipeDetailProvider(recipeId)),
),
data: (recipe) => _RecipeBody(recipe: recipe),
data: (recipe) => Stack(
children: [
if (recipe.imageUrl != null)
SizedBox(
height: MediaQuery.of(context).size.height * 2 / 3,
child: Image.network(
recipe.imageUrl!,
fit: BoxFit.cover,
width: double.infinity,
alignment: Alignment.topCenter,
),
),
SingleChildScrollView(
child: Column(
children: [
SizedBox(height: MediaQuery.of(context).size.height * 2 / 3),
_RecipeBody(recipe: recipe),
],
),
),
],
),
),
);
}