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:
@@ -291,6 +291,12 @@ class AppLocalizationsHi extends AppLocalizations {
|
||||
@override
|
||||
String get addFromReceiptOrPhoto => 'रसीद या फ़ोटो से जोड़ें';
|
||||
|
||||
@override
|
||||
String get scanScreenTitle => 'स्कैन और पहचानें';
|
||||
|
||||
@override
|
||||
String get barcodeScanSubtitle => 'बारकोड से उत्पाद खोजें';
|
||||
|
||||
@override
|
||||
String get chooseMethod => 'तरीका चुनें';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user