feat: enhance navigation by adding recipe links in inventory and pantry screens

This commit is contained in:
Nils-Johan Gynther
2026-04-24 14:13:26 +02:00
parent a39640d4ea
commit 13a0ab3584
7 changed files with 42 additions and 10 deletions
@@ -47,7 +47,7 @@ class _ConsumeInventoryScreenState
);
ref.invalidate(inventoryDetailProvider(widget.itemId));
ref.invalidate(inventoryProvider);
if (mounted) context.pop();
if (mounted) context.go('/inventory');
} catch (e) {
if (mounted) {
ScaffoldMessenger.of(context)
@@ -119,10 +119,21 @@ class InventoryScreen extends ConsumerWidget {
Positioned(
right: 16,
bottom: 16,
child: FloatingActionButton.extended(
onPressed: () => context.push('/inventory/create'),
icon: const Icon(Icons.add),
label: const Text('Lägg till'),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
FloatingActionButton.extended(
onPressed: () => context.push('/inventory/create'),
icon: const Icon(Icons.add),
label: const Text('Lägg till'),
),
const SizedBox(height: 8),
FloatingActionButton.extended(
onPressed: () => context.go('/recipes'),
icon: const Icon(Icons.restaurant_menu),
label: const Text('Recept'),
),
],
),
),
],