Integrate local notifications scheduler for reminders
This commit is contained in:
+19
-7
@@ -46,16 +46,28 @@ flutter run --dart-define=ENABLE_BACKGROUND_SYNC=false
|
||||
|
||||
## Reminder Delivery Scaffold
|
||||
|
||||
Reminder scheduling is now wired through `ReminderScheduler` and reconciled from
|
||||
`LocalRepository` on startup/state changes.
|
||||
Reminder scheduling is now wired through `ReminderScheduler` and reconciled
|
||||
from `LocalRepository` on startup/state changes.
|
||||
|
||||
Current default implementation is no-op:
|
||||
Default implementation now uses local notifications runtime where supported.
|
||||
|
||||
- `NoopReminderScheduler` in
|
||||
`lib/features/reminders/scheduling/reminder_scheduler.dart`
|
||||
Control flag:
|
||||
|
||||
This keeps behavior stable across all platforms until real local notification
|
||||
integration is added.
|
||||
```bash
|
||||
flutter run --dart-define=ENABLE_LOCAL_NOTIFICATIONS=true
|
||||
```
|
||||
|
||||
Disable notifications explicitly:
|
||||
|
||||
```bash
|
||||
flutter run --dart-define=ENABLE_LOCAL_NOTIFICATIONS=false
|
||||
```
|
||||
|
||||
Behavior notes:
|
||||
|
||||
- web: no-op fallback
|
||||
- linux: schedule fallback (no-op) due platform scheduling limitations in plugin
|
||||
- android/iOS/macOS/windows: scheduled local notifications
|
||||
|
||||
## Local Persistence Backend
|
||||
|
||||
|
||||
+32
-2
@@ -2,6 +2,36 @@
|
||||
|
||||
Updated: 2026-02-15
|
||||
|
||||
## Latest Milestone (2026-02-15): Local Notifications Reminder Runtime
|
||||
|
||||
Implemented reminder delivery with local notifications runtime integration:
|
||||
|
||||
- Added dependency:
|
||||
- `flutter_local_notifications`
|
||||
- Added concrete scheduler:
|
||||
- `lib/features/reminders/scheduling/reminder_scheduler_local_notifications.dart`
|
||||
- `LocalNotificationsReminderScheduler`
|
||||
- reconciles local reminders into platform notification schedule
|
||||
- supports recurring cadence mapping:
|
||||
- daily -> `DateTimeComponents.time`
|
||||
- weekly -> `DateTimeComponents.dayOfWeekAndTime`
|
||||
- monthly -> `DateTimeComponents.dayOfMonthAndTime`
|
||||
- web/linux gracefully no-op (scheduling fallback)
|
||||
- Provider wiring now defaults to local notifications scheduler:
|
||||
- `lib/features/reminders/scheduling/reminder_scheduler_provider.dart`
|
||||
- gated by `ENABLE_LOCAL_NOTIFICATIONS`
|
||||
- Added config flag:
|
||||
- `lib/core/config/app_config.dart` -> `enableLocalNotifications`
|
||||
- Added tests:
|
||||
- `test/features/reminders/scheduling/reminder_scheduler_local_notifications_test.dart`
|
||||
- Updated setup docs:
|
||||
- `docs/SETUP.md`
|
||||
|
||||
Validation for this milestone:
|
||||
|
||||
- `flutter analyze` -> pass
|
||||
- `flutter test` -> pass
|
||||
|
||||
## Latest Milestone (2026-02-15): Sync Rejection Payload Inspection
|
||||
|
||||
Improved conflict handling UX in Sync view:
|
||||
@@ -169,8 +199,8 @@ Validation for this milestone:
|
||||
### Open Phases (Current)
|
||||
|
||||
1. Reminder delivery runtime integration:
|
||||
- replace no-op scheduler with platform local notifications implementation
|
||||
for Android/iOS/macOS/Windows/Linux/Web-safe fallback.
|
||||
- implemented for Android/iOS/macOS/windows with web/linux safe fallback.
|
||||
- future enhancement: permission UX and direct notification tap routing.
|
||||
2. Conflict resolution UX:
|
||||
- reject/requeue + payload inspect are implemented; future enhancement is
|
||||
direct deep-link navigation to entity edit screens from Sync view.
|
||||
|
||||
Reference in New Issue
Block a user