How theakhinabraham/doable-todo-list-app works
Purpose and Runtime
Offline, single-device Flutter todo app for Android and iOS. It manages tasks, schedules reminder notifications, supports repeat rules and filtering, and persists task data locally—no backend or cloud service. Dart/Flutter is the application runtime; native platform hosts are Android and iOS.
Application Entry and Composition
lib/main.dart is the Flutter entry point and app composition boundary. It initializes the widget application and routes users into the task UI. Native Flutter bootstraps are android/app/src/main/kotlin/com/example/doable_todo_list_app/MainActivity.kt and ios/Runner/AppDelegate.swift.
Presentation Layer
Task workflows are organized as Flutter screens:
• lib/screens/home_page.dart presents the primary task list, filtering, completion ordering, and deletion interactions.
• lib/screens/add_task_page.dart collects title, description, date/time, repeat, and reminder choices to create tasks.
• lib/screens/edit_task_page.dart updates or removes existing tasks.
• lib/screens/settings_page.dart owns application-level data-management actions, including clearing stored data.
UI state and user actions cross into the repository rather than directly owning persistence concerns.
Task Domain and Repository Boundary
lib/models/task_entity.dart is the canonical task record: identity, text, date/time display values, reminder flag, repeat rule, completion state, and timestamps. lib/repositories/task_repository.dart is the persistence-facing facade used to isolate presentation from database implementation. This boundary is the intended extension point for alternate stores or future cloud sync without rewriting screens.
SQLite Persistence Pipeline
Persistence follows screen → repository → DAO → database:
• lib/data/task_dao.dart implements task CRUD and query operations.
• lib/data/database_service.dart opens/manages the local SQLite database and schema lifecycle.
• lib/models/task_entity.dart serializes between typed task objects and SQLite row data.
The central durable boundary is the on-device SQLite tasks table. Stored fields cover task content, scheduling, notification/repeat metadata, completion, and audit timestamps.
Scheduling and Notifications
lib/services/notification_service.dart encapsulates reminder-notification behavior. Add/edit flows supply task scheduling data; notification scheduling is separate from the database layer, while reminder intent/state is persisted on the task record. Notifications therefore depend on device platform capabilities, whereas task storage remains usable offline regardless of notification delivery.
Platform and External Dependencies
Flutter packages declared through pubspec.yaml provide SQLite (sqflite), preferences (shared_preferences), date formatting (intl), SVG rendering, and external-link launching. SharedPreferences is a separate local settings store from SQLite. Android build/runtime configuration resides in android/app/build.gradle; iOS packaging and app metadata reside in ios/Runner/Info.plist. No remote API, authentication provider, or server-side infrastructure is present.
Main entry points: main.dart App entry & composition · task_repository.dart Task repository · notification_service.dart Notification service · add_task_page.dart Add task
Components 14
Flutter app
- App entry & composition
lib/main.dart - Home task list · Lists, filters, completes, and deletes tasks.
lib/screens/home_page.dart - Add task
lib/screens/add_task_page.dart - Edit task
lib/screens/edit_task_page.dart - Settings · Provides local data-management actions.
lib/screens/settings_page.dart - Task entity · Canonical task and SQLite row serialization.
lib/models/task_entity.dart - Task repository · Presentation boundary for task storage.
lib/repositories/task_repository.dart - Notification service · Schedules reminders independently of task persistence.
lib/services/notification_service.dart
Local storage
- Task DAO · Implements task CRUD and queries.
lib/data/task_dao.dart - Database service · Opens and manages database schema.
lib/data/database_service.dart - SQLite tasks table · Stores task content, scheduling, repeat, completion, and timestamps.
- SharedPreferences · Separate local store for preferences.
pubspec.yaml
Device platforms
- Android host
android/app/src/main/kotlin/com/example/doable_todo_list_app/MainActivity.kt - iOS host
ios/Runner/AppDelegate.swift
Connections 19
- Android host → App entry & composition: boots Flutter app
- iOS host → App entry & composition: boots Flutter app
- App entry & composition → Home task list: routes to
- App entry & composition → Add task: routes to
- App entry & composition → Edit task: routes to
- App entry & composition → Settings: routes to
- Home task list → Task repository: task operations
- Add task → Task repository: creates task
- Edit task → Task repository: updates or removes task
- Settings → Task repository: clears task data
- Add task → Notification service: schedules reminder
- Edit task → Notification service: updates reminder
- Task repository → Task DAO: persists via
- Task repository → Task entity: uses
- Task DAO → Database service: uses
- Task DAO → Task entity: maps rows
- Database service → SQLite tasks table: manages
- Notification service → Android host: uses notification capabilities
- Notification service → iOS host: uses notification capabilities