mirror of
https://github.com/kuhyx/diet-guard.git
synced 2026-11-10 20:27:11 +01:00
The first edit surface, landing after the sync layer so a schedule set here reaches the PC rather than leaving the two devices deriving different slots. Three dropdowns -- first meal, last meal, meals per day -- and a live preview of the checkpoints they derive. Setting 08:00, 20:00 and 5 shows 08:00 · 11:00 · 14:00 · 17:00 · 20:00, which is asserted in the screen test rather than only in the model's. Dropdowns rather than showTimePicker: that returns a TimeOfDay with minutes, and slots are whole hours on both devices by design. They also make the invalid states unrepresentable instead of validated -- "last meal" offers only hours after "first", and "meals per day" only counts the window has whole hours for. MealSchedule.normalized() still clamps, but that is the defence against corrupt synced data, not the input contract. Saving re-runs the due-slot check, because reminder ids are slot hours: a schedule change orphans the ids it no longer contains, and waiting for the next background tick would leave a stale nag on screen for up to 15 minutes. The UI is a `part` mixin like settings_kcal_goal.dart -- settings_screen.dart was at 238 of the 250-line cap and is now at 247. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159b4E5hh512jYUeaJVNxfM |
||
|---|---|---|
| .. | ||
| desktop | ||
| models | ||
| screens | ||
| services | ||
| widgets | ||
| fake_notifications.dart | ||
| fake_secure_storage.dart | ||
| firebase_backend_google_test.dart | ||
| google_platform_test.dart | ||
| google_sign_in_backend_test.dart | ||
| keyboard_operability_test.dart | ||
| repo_invariants_test.dart | ||
| widget_test.dart | ||