feat: barcode scanning for shelf add + scan screen barcode option

- Add ShelfBarcodeScanScreen: scans barcode via mobile_scanner, looks up
  product via GET /products/barcode/{barcode} (Open Food Facts fallback),
  returns CatalogProduct to caller; loading overlay while looking up;
  "Add manually" fallback in AppBar for unknown products
- Extract AddToShelfSheet to add_to_shelf_sheet.dart (was private in
  product_search_screen.dart) so both search and scan screens can reuse it
- Add barcode icon button to ProductSearchScreen AppBar → opens scanner
- Add "Scan barcode" card (📷) to ScanScreen alongside receipt and photo modes
- Rename ScanScreen title: addFromReceiptOrPhoto → scanScreenTitle
  ("Сканировать" / "Scan & Recognize") to reflect all three modes
- Add 2 L10n keys (scanScreenTitle, barcodeScanSubtitle) across all 12 locales

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
dbastrikin
2026-03-26 15:21:56 +02:00
parent 7b2f86c6a4
commit b2bdcbae6f
29 changed files with 537 additions and 277 deletions

View File

@@ -100,6 +100,8 @@
"navProducts": "食品",
"navRecipes": "食谱",
"addFromReceiptOrPhoto": "从收据或照片添加",
"scanScreenTitle": "扫描与识别",
"barcodeScanSubtitle": "通过条形码查找产品",
"chooseMethod": "选择方式",
"photoReceipt": "拍摄收据",
"photoReceiptSubtitle": "识别收据中的所有商品",