Skip to content

NeoRecasata/notes_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notes App

A minimal CRUD notes app built as a testbed for comparing Flutter local database solutions. The UI is intentionally simple so the database layer is the only variable.

The master branch has no database, just hardcoded mock data. Two branches fork from it, each implementing the same functionality with a different database:

Branch Database Approach
master / starter-app None (mock data) Hardcoded list, no persistence
implement-isar Isar Annotations + code generation
implement-sqlflite sqflite Hand-written SQL + DatabaseService singleton

Both database branches use the same Provider + ChangeNotifier pattern so the comparison is apples-to-apples.

Verdict: sqflite won. Isar's code generation produced 636 lines for a single model. sqflite required more manual code but gave full visibility into what was happening. The winner was applied to the Expense Tracker.

Read the full write-up on my portfolio: neoreca.dev/software/notes-app

Features

  • Add, edit, delete notes with title and content
  • Edit validation (at least one field must change to save)
  • Material Design 3 theming

Getting Started

Prerequisites

  • Flutter SDK (3.5.0+)
  • A target platform set up (iOS, Android, macOS, Windows, Linux, or web)

Run

git clone https://github.com/NeoRecasata/notes_app.git
cd notes_app
flutter pub get
flutter run

Switch branches to compare databases

# sqflite implementation
git checkout implement-sqlflite
flutter pub get
flutter run

# Isar implementation
git checkout implement-isar
flutter pub get
dart run build_runner build
flutter run

Project Structure

lib/
  main.dart
  models/
    note.dart
  pages/
    home_page.dart
    widgets/
      add_note_dialog.dart
      delete_note_button.dart
      delete_note_dialog.dart
      edit_note_button.dart
      edit_note_dialog.dart
      note_list_tile.dart

License

MIT

About

Minimal notes app built with Flutter, Provider, and Drift (SQLite)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors