Offline Grocery List
Build a grocery list app in Flutter that works completely offline. You add items with a quantity, and each item belongs to a store section (produce, dairy, bakery, frozen and so on), so the list is grouped the way you walk through the shop. Tick items off as you put them in the cart, clear the ticked ones when you're done, and the app remembers which section you used for each item last time. Everything is saved on the phone in a Drift (SQLite) database, and Riverpod keeps the screen in sync with the data. It's a good first Flutter project with a real database: you'll learn Drift tables and queries, Riverpod providers, grouped lists, forms and validation, and testing.
- Estimate
- ~9h
- Steps
- 6
- Completed by
- 0
- Proposed by
- codeseed.app
Riverpod · Drift
Project roadmap
- 01
Plan the data and screens
~1hWrite README.md: an item has a name, a quantity (optional text such as 2 or 500 g), a section, a checked flag and a created date; sections have a name and a sort order that matches your shop's layout. Describe the screens: the grouped list, adding and editing an item, and managing sections. Create the project and add drift, drift_flutter and flutter_riverpod. Done when: the app runs, and README.md describes the data and screens.
- 02
Create the database
~1.5hDefine Drift tables for sections and items (with a foreign key to sections), and add default sections on first launch. Write queries: watch all items with their section, ordered by section order then name; insert, update, toggle checked, and delete checked items. Run the code generator. Done when: the queries work in a quick test with an in-memory database.
- 03
Build the grouped list
~2hCreate Riverpod providers that watch the Drift queries as streams, so the list updates by itself. Show items grouped under section headers, with a checkbox; checked items move to the bottom of their section and appear crossed out. Show a friendly message when the list is empty. Done when: adding and ticking items updates the list immediately.
- 04
Add and edit items
~1.5hBuild a form to add or edit an item: the name (required, and warn when the same unchecked item already exists), the quantity, and the section, pre-selected with the section used last time for that name. Swipe an item to delete it with Undo. Add a Clear checked button with confirmation. Done when: items can be added, edited and removed, and the section suggestion works.
- 05
Manage sections
~1.5hAdd a screen to add, rename, delete and reorder sections by dragging (ReorderableListView), saving the new order. Deleting a section that still has items asks where to move them. Done when: reordering sections changes the grouping on the main list.
- 06
Test it
~1.5hWrite tests with an in-memory Drift database: grouping and ordering, toggling, clearing checked items, the last-used section suggestion, and moving items when a section is deleted. Add a widget test that adds an item and ticks it. Done when: flutter test passes.
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack