Skip to content
UsecaseBoard
← All use cases
dev.toFood and meals

Build a grocery receipt scanner with an editable review

At a glance

A Flutter developer uses Gemini to turn grocery receipts into a reviewed inventory and recipe suggestions. This workflow is listed under Food and meals.

Agents / tools
Google

SourceBuilding a tool for these workflows? See weekly rates.

What they did

1) In a Flutter app, capture a receipt with image_picker, using maxWidth 1024 and imageQuality 80 in the example. Define a receipt item with name, quantity, unit, price, nullable expiry date and an estimated flag. 2) Send the compressed image and a prompt to Gemini 2.5 Flash with JSON response mode and a schema for store, purchase date and items. Ask it to skip unreadable lines and flag estimated expiry dates. 3) Decode the API envelope and its JSON text into item objects. Show an editable list so the user can correct names, quantities and dates before saving the confirmed inventory. 4) Sort saved items by expiry date and surface those expiring in the next three days. Send the near-expiry items in a second text request asking for three simple recipes. For production, have a backend make the API request and keep the key there.

Worth knowing

Expiry dates not printed on the receipt are estimates and must be labelled and editable. Receipt images leave the device; blurry text can be misread.

Save ideas in this browser. Upvotes count across the board.

Prompt excerpt

No prompt excerpt was provided by the source.

Sponsored

CodeBuddy

Tencent Cloud AI coding assistant for IDE and CLI.

Try CodeBuddy ↗
Explore all →