feat: share and import meals via QR code#326
Open
jordan-lee-code wants to merge 12 commits intosimonoppowa:developfrom
Open
feat: share and import meals via QR code#326jordan-lee-code wants to merge 12 commits intosimonoppowa:developfrom
jordan-lee-code wants to merge 12 commits intosimonoppowa:developfrom
Conversation
Adds two new options to the meal section popup menu: - 'Share meal' — encodes all items in a meal as a compact gzip+base64 QR code, with copy and native share sheet options - 'Import shared meal' — opens the camera to scan a shared QR code and imports the items; includes a 'paste code' fallback for devices without a camera Supported on Android, iOS and all existing locales (en, de, cz, it, tr, uk).
OFF items are stored as 3-field barcode refs [barcode, amount, unit] and resolved live from OpenFoodFacts on import; custom/FDC items carry full nutritional arrays. Cuts payload size significantly for typical OFF-heavy diaries. Adopted as clean v1 format (feature not yet merged). OFF lookups are parallelised via Future.wait. Partial-import failures surface a per-locale snackbar.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: share and import meals via QR code
Adds two new options to the meal section popup menu (Breakfast, Lunch, Dinner, Snack) on the Home and
Diary pages.
Share meal — encodes all food items in a meal into a compact QR code (gzip + base64url compressed)
displayed in a dialog, with copy-to-clipboard and native share sheet buttons.
Import shared meal — opens the camera to scan a shared QR code, shows a confirmation dialog listing the
number of items to be imported, then adds them to the selected meal. A "paste code" fallback (keyboard
icon in the app bar) is available for devices without camera access.
Image thumbnails for food items are preserved in the shared payload where available.
Changes:
Addition to ... menu to allow sharing of meals with friends and family.

Generate QR code for easy sharing, you can copy the code and send it, or use the share menu.

Once import a shared meal is clicked you can scan the QR code and import the item

If the camera is unavailable, you can import using a code

You can paste the code and import the meal
You then get the same import x items prompt, click 'ok' and it'll import into the selected meal.
Closes #81