Help us measure site usage?

With your permission, we use self-hosted analytics to understand page usage. It is optional and does not affect the Service. Learn more.

DartintermediatemobileAI generated

Flutter Recipe Book with SQLite

Build a Flutter recipe book that saves your recipes on the phone in a real SQLite database using the sqflite package. Each recipe has a name, ingredients, preparation steps, a cooking time and an optional photo from your gallery. You can browse all recipes, search them as you type, open one to read it, edit it, and delete it after confirming. Photos are copied into the app's own folder with path_provider, so they stay available even if they're deleted from the gallery. You'll learn SQLite in Flutter (tables, queries and migrations), separating the database code from the screens, forms with validation, picking and storing images, and navigating between screens.

Estimate
~10h
Steps
6
Completed by
0
Proposed by
codeseed.app

Flutter · sqflite · path_provider

Project roadmap

  1. 01

    Set up the database

    ~2h

    Create a Flutter project and add sqflite, path and path_provider. Define a Recipe class (id, name, ingredients, steps, minutes, photo path, created at) with toMap and fromMap. Write a RecipeDatabase class that opens recipes.db, creates the table in onCreate, and has a version number with an onUpgrade function for future changes. Done when: the app starts and creates the database.

  2. 02

    Write the CRUD methods

    ~1.5h

    Add methods to RecipeDatabase: insert, update, delete, getAll (sorted by name) and search(text), which uses a WHERE with LIKE and ? arguments (never building SQL from user text) on the name and ingredients. Write unit tests using sqflite_common_ffi so they run on your computer. Done when: the tests show each method works.

  3. 03

    Build the list with search

    ~1.5h

    Build the home screen: a search field and a list of recipes showing a small photo, the name and the cooking time. Searching updates the list as you type (waiting briefly after the last key). Show a message when there are no recipes, and another when a search finds nothing. Done when: recipes appear in the list and the search filters them.

  4. 04

    Build the add and edit form

    ~2h

    Build one form for adding and editing: name (required), ingredients and steps (multi-line, required), cooking time (a number from 1 to 1,440), and a photo chosen with the image_picker package. Copy the chosen photo into the app's documents folder and store that path. Validate with a Form and validators, and return to the list after saving. Done when: recipes can be created and edited, and invalid input shows errors.

  5. 05

    Add details and deleting

    ~1.5h

    Build a detail screen with the photo, time, ingredients and steps, and Edit and Delete buttons. Delete asks for confirmation in a dialog, then removes the recipe and its photo file. Refresh the list when coming back from the detail or edit screens. Done when: deleting removes the recipe and its photo, and the list updates.

  6. 06

    Test it

    ~1.5h

    Add a widget test for the form's validation and a test of the list screen with a fake database. Test by hand: restart the app and check everything is kept, and delete a photo from the gallery to check the recipe still shows it. Done when: flutter test passes, and the manual checks work.

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~10h · 6 steps

Tech stack

Fluttersqflitepath_provider