A feature-rich personal diary app built with Flutter, Riverpod state management, and SQLite local storage. Write diary entries with text, attach voice recordings, pick your mood from 5 emoji icons, browse entries on a calendar, and search across all your memos — all with full dark/light/system theme support.
- Create diary entries — title, description, mood, date & time
- Voice recording — record, playback, and attach audio to any diary entry
- Speech-to-text — dictate diary text using the microphone
- Mood tracking — choose from 5 moods: Rad, Good, Meh, Bad, Awful (emoji icons)
- Interactive calendar —
table_calendarview showing days with entries marked - Full-text search — search across all entry titles and descriptions
- Edit & delete — update or remove any existing diary entry
- Dark / Light / System theme — switchable from the Settings screen
- Audio waveform playback — visual waveform display while playing back recorded audio
- SQLite persistence — all entries stored locally in
dairy.dbviasqflite - Poppins font — custom bundled typeface throughout the app
| Technology | Usage |
|---|---|
| Flutter | UI Framework |
| Dart | Programming Language |
flutter_riverpod ^2.6.0 |
State management (StateNotifier, AsyncValue) |
sqflite ^2.4.2 |
SQLite local database |
record ^6.1.1 |
Audio recording (AAC format) |
audioplayers ^6.5.0 |
Audio playback |
audio_waveforms ^1.3.0 |
Waveform visualizer for playback |
speech_to_text ^7.3.0 |
Voice-to-text dictation |
table_calendar ^3.1.3 |
Full interactive calendar widget |
path_provider ^2.1.5 |
File system path for audio storage |
intl ^0.19.0 |
Date & time formatting |
google_nav_bar ^5.0.7 |
Styled bottom navigation bar |
| Poppins (bundled) | Custom font (assets/fonts/) |
lib/
├── main.dart # ProviderScope + theme watcher
├── common/ # App-wide reusable widgets
│ ├── back_button.dart # Custom back button
│ ├── icon.dart # Asset icon path constants
│ ├── my_text.dart # Styled text widget
│ ├── my_text_field.dart # Custom text field
│ ├── show_snackbar.dart # SnackBar helper
│ └── themes.dart # Light & dark ThemeData
└── modules/
├── search_dairy/
│ └── search_dairy.dart # Full-text search screen
└── Home/
├── data_base/
│ └── data_base.dart # SQLite singleton (CRUD)
├── models/
│ └── dairy_model.dart # DairyModel (toMap/fromMap)
├── provider/
│ └── dairy_provider.dart # DairyNotifier + selectedDateProvider
├── views/
│ ├── home_screen.dart # Home with date strip & entries
│ ├── bottom_nav_bar.dart # FAB + bottom nav
│ ├── calender_provider.dart # Date/days-in-month providers
│ ├── more.dart # Settings screen
│ └── theme/
│ ├── themes.dart # Theme settings screen (radio)
│ └── provider/
│ └── theme_pro.dart # ThemeNotifier (system/light/dark)
├── widgets/
│ ├── calender.dart # TableCalendar with diary events
│ ├── dairy_entries_list.dart # Filtered list by selected date
│ ├── dairy_list.dart # Diary card item
│ ├── date_list_view.dart # Horizontal scrollable date strip
│ ├── day_month_header.dart # Month/year header with nav
│ ├── home_app_bar.dart # Home screen AppBar
│ ├── dailog.dart # Mood feeling picker dialog
│ └── my_dailog.dart # Reusable dialog wrapper
├── add_dairy/
│ ├── models/
│ │ └── speech_model.dart # SpeechState model
│ ├── provider/
│ │ ├── provider.dart # SpeechNotifier (speech-to-text)
│ │ └── recorder_pro.dart # RecorderNotifier (record/play)
│ ├── views/
│ │ └── add_dairy.dart # Add new diary entry screen
│ └── widgets/
│ ├── audio_control.dart # Record/play audio controls
│ ├── custom_nav_bar.dart # Bottom bar with speech-to-text
│ ├── edit_date.dart # Inline date picker widget
│ ├── time_picker.dart # Time picker widget
│ ├── save_button.dart # Reusable save/action button
│ └── random_snackbar.dart # Random motivational snackbar
└── show_dairy/
├── provider/
│ └── audio_player_pro.dart # AudioPlayerNotifier (waveform)
├── views/
│ └── dairy_info.dart # View diary entry detail
├── edit_dairy/
│ └── edit_dairy.dart # Edit existing diary entry
└── widgets/
├── audio_player.dart # Waveform audio player widget
└── delete_button.dart # Delete with confirm dialog
assets/
├── fonts/
│ └── Poppins-Regular.ttf # Bundled Poppins font
└── icons/
├── rad.png # 😄 Mood icon
├── good.png # 🙂 Mood icon
├── meh.png # 😐 Mood icon
├── bad.png # 😟 Mood icon
├── awful.png # 😞 Mood icon
├── dairy_title_.png
├── home_icon.png
├── home_calender.png
└── home_search.png
CREATE TABLE dairy (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT,
description TEXT,
time TEXT,
dateTime TEXT, -- stored as ISO 8601 string
mode TEXT, -- mood icon asset path
modeText TEXT, -- mood label (Rad/Good/Meh/Bad/Awful)
audioPath TEXT -- local file path to .aac recording
);View (ConsumerWidget / ConsumerStatefulWidget)
↓ ref.watch / ref.read
Providers (StateNotifierProvider)
↓
StateNotifier → AsyncValue<List<DairyModel>>
↓
DatabaseHelper (SQLite singleton)
↓
dairy.db (local storage)
Providers overview:
| Provider | Type | Responsibility |
|---|---|---|
dairyNotifierProvider |
StateNotifierProvider |
Full CRUD + search for diary entries |
selectedDateProvider |
StateProvider |
Currently selected date on home screen |
themeProvider |
StateNotifierProvider |
App theme (system / light / dark) |
recorderProvider |
StateNotifierProvider |
Audio recording & playback state |
speechProvider |
StateNotifierProvider |
Speech-to-text state |
audioPlayerProvider |
StateNotifierProvider.family |
Per-entry audio waveform playback |
currentDateProvider |
StateProvider |
Calendar month navigation |
daysInMonthProvider |
Provider |
Computed days list for current month |
- Flutter SDK
>=3.8.1 - Dart SDK
>=3.0.0 - Android Studio / VS Code with Flutter extension
- Microphone permission on device (for recording & speech-to-text)
-
Clone the repository
git clone https://github.com/maazkhan-tech/flutter-diary-app-sqlite.git cd flutter-diary-app-sqlite -
Install dependencies
flutter pub get
-
Run the app
flutter run
Add the following to android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>For iOS, add to ios/Runner/Info.plist:
<key>NSMicrophoneUsageDescription</key>
<string>Required for voice diary recording</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>Required for speech-to-text diary input</string>dependencies:
flutter_riverpod: ^2.6.0
riverpod: ^2.6.1
sqflite: ^2.4.2
path_provider: ^2.1.5
record: ^6.1.1
audioplayers: ^6.5.0
audio_waveforms: ^1.3.0
speech_to_text: ^7.3.0
table_calendar: ^3.1.3
intl: ^0.19.0
google_nav_bar: ^5.0.7
cupertino_icons: ^1.0.8StateNotifierProvider.familyfor per-instance state (audio player per diary entry)- SQLite singleton pattern with
sqfliteandpathfor persistent local storage record+audioplayersintegration for full audio record/playback workflowsaudio_waveformsPlayerControllerfor real-time waveform visualizationspeech_to_textinitialization and stream-based result handlingtable_calendarwith custom event loaders and day selectionThemeModeswitching via Riverpod with system/light/dark supportWidgetsBinding.addPostFrameCallbackfor post-render scroll actionsStateNotifierProvider.familykeyed by file path for audio player instances- Custom font bundling with
pubspec.yamlassets declaration
- Persist theme preference with
shared_preferences - Add PIN / biometric lock for privacy
- Export diary entries as PDF
- Add photo attachment to diary entries
- Reminder notifications for daily journaling
- Backup & restore entries to cloud
Contributions, issues, and feature requests are welcome! Feel free to open an issue or submit a pull request.
This project is open source and available under the MIT License.
Your Name
- GitHub: @maazkhan-tech
- LinkedIn: Click