feat: add pantry management features including repository, providers, and UI integration

This commit is contained in:
Nils-Johan Gynther
2026-04-22 10:45:37 +02:00
parent f11364b73e
commit dd05fed279
9 changed files with 615 additions and 7 deletions
+5
View File
@@ -20,4 +20,9 @@ class InventoryApiPaths {
static String remove(int id) => '/inventory/$id';
static String consume(int id) => '/inventory/$id/consume';
static String consumptionHistory(int id) => '/inventory/$id/consumption-history';
}
class PantryApiPaths {
static const list = '/pantry';
static String remove(int id) => '/pantry/$id';
}
+5
View File
@@ -17,6 +17,7 @@ import '../../features/inventory/presentation/create_inventory_screen.dart';
import '../../features/inventory/presentation/inventory_edit_screen.dart';
import '../../features/inventory/presentation/consume_inventory_screen.dart';
import '../../features/inventory/presentation/consumption_history_screen.dart';
import '../../features/pantry/presentation/pantry_screen.dart';
final appRouterProvider = Provider<GoRouter>((ref) {
final authState = ref.watch(authStateProvider);
@@ -158,6 +159,10 @@ final appRouterProvider = Provider<GoRouter>((ref) {
path: '/inventory',
builder: (context, state) => const InventoryScreen(),
),
GoRoute(
path: '/baslager',
builder: (context, state) => const PantryScreen(),
),
GoRoute(
path: '/profile',
builder: (context, state) => const ProfileScreen(),
+6
View File
@@ -27,6 +27,12 @@ class AppShell extends ConsumerWidget {
icon: Icons.inventory_2_outlined,
label: 'Inventarie',
),
_AppDestination(
path: '/baslager',
title: 'Baslager',
icon: Icons.storefront_outlined,
label: 'Baslager',
),
_AppDestination(
path: '/profile',
title: 'Profil',