feat(inventory): implement swipeable inventory tile and product picker field

This commit is contained in:
Nils-Johan Gynther
2026-04-22 21:19:36 +02:00
parent b04a82aaf8
commit 14d782aeec
6 changed files with 632 additions and 170 deletions
@@ -24,18 +24,16 @@ final mealPlanDashboardProvider = FutureProvider<MealPlanDashboard>((ref) async
return guardedApiCall(ref, () async {
final repository = ref.read(mealPlanRepositoryProvider);
final entries = await repository.fetchEntries(week.fromIso, week.toIso, token: token);
final shoppingItems = await repository.fetchShoppingList(week.fromIso, week.toIso, token: token);
final inventoryCompareItems = await repository.fetchInventoryCompare(
week.fromIso,
week.toIso,
token: token,
);
// Start all three requests in parallel.
final entriesFuture = repository.fetchEntries(week.fromIso, week.toIso, token: token);
final shoppingFuture = repository.fetchShoppingList(week.fromIso, week.toIso, token: token);
final compareFuture = repository.fetchInventoryCompare(week.fromIso, week.toIso, token: token);
return MealPlanDashboard(
entries: entries,
shoppingItems: shoppingItems,
inventoryCompareItems: inventoryCompareItems,
entries: await entriesFuture,
shoppingItems: await shoppingFuture,
inventoryCompareItems: await compareFuture,
);
});
});