feat: enhance inventory and pantry features with filtering, sorting, and error handling improvements

This commit is contained in:
Nils-Johan Gynther
2026-04-22 18:14:19 +02:00
parent dd05fed279
commit 07ed164112
8 changed files with 142 additions and 11 deletions
@@ -4,6 +4,7 @@ class PantryItem {
final String productName;
final String? canonicalName;
final String? category;
final int? categoryId;
const PantryItem({
required this.id,
@@ -11,6 +12,7 @@ class PantryItem {
required this.productName,
this.canonicalName,
this.category,
this.categoryId,
});
String get displayName {
@@ -28,6 +30,7 @@ class PantryItem {
productName: (product['name'] ?? '').toString(),
canonicalName: product['canonicalName']?.toString(),
category: product['category']?.toString(),
categoryId: (product['categoryId'] as num?)?.toInt(),
);
}
}