A lightweight Flutter journal that surfaces the user’s thoughts, memories, and word count statistics via a Courier Prime theme while keeping everything on-device. The root widget wires a ChangeNotifierProvider so the diary entries load once at startup and feed the multi-tab HomeScreenNew that exposes a summary, year view, and search interface.
- Flutter SDK 3.x (pubspec bounds
>=3.0.0 <4.0.0). - Dependencies:
providerfor simple state management,google_fontsfor typography,path_providerfor locating the documents directory,intlfor localized date strings, plus shared defaults such ascupertino_icons.
- Install Flutter from flutter.dev and ensure
flutter doctorreports no blocking issues. - Run
flutter pub getfrom the project root to fetch the declared dependencies (pubspec.yamllines 9-24).
- Connect a device or start an emulator.
- Launch
flutter run(add-d <device-id>when targeting a specific platform). - The app boots
MyApp(lib/main.dart:7-35), applies a dark Material3 theme, and showsHomeScreenNewwith floating-action navigation toEntryScreen.
- Track entries grouped by year, view word/entry counts on the welcome card, and toggle between “Início”, “Anos”, and “Pesquisar” tabs (
lib/screens/home_screen_new.dart:36-184). - Drill down into a specific year to browse monthly sections and tap a card to edit entries (
lib/screens/entries_by_year_screen.dart:26-164). - Use the search tab with indexed filtering and inline previews before opening the full entry editor (
lib/screens/search_screen.dart:28-151).
DiaryProviderhandles the in-memory list ofEntrymodels, exposes CRUD helpers, and persists changes throughDiaryService(lib/providers/diary_provider.dart:5-32).DiaryServicereads/writes a localdiary.jsonatgetApplicationDocumentsDirectory()to survive restarts (lib/services/diary_service.dart:6-30).Entryserializes/deserializes to JSON with an ISO timestamp so the service can round-trip without losing metadata (lib/models/entry.dart:3-29).
-
This branch keeps every entry in the host device’s Documents directory inside
diary.json; theDiaryServiceserializes the in-memory list to JSON when saving and decodes it back during startup, so nothing ever leaves the local filesystem. -
The alternate branch that syncs via GitHub Gists is tracked separately—update the link below once you decide where to host it:
- Dart SDK constraint:
>=3.0.0 <4.0.0(pubspec lines 6-7). - No external API keys or platform-critical env vars; the journal relies solely on device storage.
Run flutter test to execute whatever tests exist or to confirm the default Flutter setup (pubspec.yaml:19-22).
- Entries live only in the device’s documents directory; there is no cloud sync or backup capability.
- Editing/deleting requires manual confirmation in the modal dialog, and there is no conflict resolution if multiple instances run simultaneously.
- Shared preferences is declared but unused, so persistent settings would require additional wiring.