feat: enhance navigation by adding recipe links in inventory and pantry screens
This commit is contained in:
@@ -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'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user