feat: enhance inventory and pantry features with filtering, sorting, and error handling improvements
This commit is contained in:
@@ -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(),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user