feat: product search screen with catalog add and success feedback
- Add product search screen (/products/search) as primary add flow; "Add" button on products list opens search, manual entry remains as fallback - Add to shelf bottom sheet with AnimatedSwitcher success view (green checkmark) and SnackBar confirmation on the search screen via onAdded callback - Manual add (AddProductScreen) shows SnackBar on success before popping back - Extend AddProductScreen with optional nutrition fields (calories, protein, fat, carbs, fiber); auto-fills from catalog selection and auto-expands section - Auto-upsert catalog product on backend when nutrition data is provided without a primary_product_id, linking the user product to the catalog - Add fiber_per_100g field to CatalogProduct model and CreateRequest - Add 16 new L10n keys across all 12 locales (addProduct, addManually, searchProducts, quantity, storageDays, addToShelf, nutritionOptional, calories, protein, fat, carbs, fiber, productAddedToShelf, etc.) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import '../../features/profile/profile_provider.dart';
|
||||
import '../../shared/models/user.dart';
|
||||
import '../../features/products/products_screen.dart';
|
||||
import '../../features/products/add_product_screen.dart';
|
||||
import '../../features/products/product_search_screen.dart';
|
||||
import '../../features/products/product_job_history_screen.dart';
|
||||
import '../../features/scan/product_job_watch_screen.dart';
|
||||
import '../../features/scan/scan_screen.dart';
|
||||
@@ -107,6 +108,11 @@ final routerProvider = Provider<GoRouter>((ref) {
|
||||
path: '/products/add',
|
||||
builder: (_, __) => const AddProductScreen(),
|
||||
),
|
||||
// Product search — search catalog before falling back to manual add.
|
||||
GoRoute(
|
||||
path: '/products/search',
|
||||
builder: (_, __) => const ProductSearchScreen(),
|
||||
),
|
||||
// Shopping list — full-screen, no bottom nav.
|
||||
GoRoute(
|
||||
path: '/menu/shopping-list',
|
||||
|
||||
Reference in New Issue
Block a user