refactor: Remove PantryProduct class and simplify category resolution in PantryScreen
Test Suite / test (24.15.0) (push) Has been cancelled

This commit is contained in:
Nils-Johan Gynther
2026-05-11 20:01:00 +02:00
parent a635f1002a
commit 68476142c1
5 changed files with 43 additions and 101 deletions
@@ -4,7 +4,6 @@ import '../../../core/api/api_providers.dart';
import '../../../core/api/guarded_api_call.dart';
import '../../auth/data/auth_providers.dart';
import '../domain/pantry_item.dart';
import '../domain/pantry_product.dart';
import 'pantry_repository.dart';
final pantryRepositoryProvider = Provider<PantryRepository>((ref) {
@@ -18,11 +17,3 @@ final pantryProvider = FutureProvider<List<PantryItem>>((ref) async {
() => ref.read(pantryRepositoryProvider).fetchPantry(token: token),
);
});
final pantryProductsProvider = FutureProvider<List<PantryProduct>>((ref) async {
final token = await ref.watch(authStateProvider.future);
return guardedApiCall(
ref,
() => ref.read(pantryRepositoryProvider).fetchProducts(token: token),
);
});