feat(04-02): wire notification settings UI, permission flow, scheduling, and tap navigation

- Convert SettingsScreen from ConsumerWidget to ConsumerStatefulWidget
- Add Benachrichtigungen section between Darstellung and Uber sections
- SwitchListTile with permission request on toggle ON (Android 13+)
- Toggle reverts to OFF on permission denial with SnackBar hint
- AnimatedSize progressive disclosure for time picker row when enabled
- _scheduleNotification() queries DailyPlanDao for task/overdue counts
- Skip notification scheduling when task count is 0
- Notification body includes overdue split when overdue > 0
- _onPickTime() shows Material 3 showTimePicker dialog then reschedules
- Wire router.go('/') in NotificationService._onTap for tap navigation
- Regenerate AppLocalizations with 7 new notification strings from Plan 01 ARB
This commit is contained in:
2026-03-16 15:06:00 +01:00
parent 903d80f63e
commit 0103ddebbb
4 changed files with 187 additions and 4 deletions

View File

@@ -471,6 +471,48 @@ abstract class AppLocalizations {
/// In de, this message translates to:
/// **'Noch keine Aufgaben angelegt'**
String get dailyPlanNoTasks;
/// No description provided for @settingsSectionNotifications.
///
/// In de, this message translates to:
/// **'Benachrichtigungen'**
String get settingsSectionNotifications;
/// No description provided for @notificationsEnabledLabel.
///
/// In de, this message translates to:
/// **'Tägliche Erinnerung'**
String get notificationsEnabledLabel;
/// No description provided for @notificationsTimeLabel.
///
/// In de, this message translates to:
/// **'Uhrzeit'**
String get notificationsTimeLabel;
/// No description provided for @notificationsPermissionDeniedHint.
///
/// In de, this message translates to:
/// **'Benachrichtigungen sind in den Systemeinstellungen deaktiviert. Tippe hier, um sie zu aktivieren.'**
String get notificationsPermissionDeniedHint;
/// No description provided for @notificationTitle.
///
/// In de, this message translates to:
/// **'Dein Tagesplan'**
String get notificationTitle;
/// No description provided for @notificationBody.
///
/// In de, this message translates to:
/// **'{count} Aufgaben fällig'**
String notificationBody(int count);
/// No description provided for @notificationBodyWithOverdue.
///
/// In de, this message translates to:
/// **'{count} Aufgaben fällig ({overdue} überfällig)'**
String notificationBodyWithOverdue(int count, int overdue);
}
class _AppLocalizationsDelegate

View File

@@ -210,4 +210,30 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get dailyPlanNoTasks => 'Noch keine Aufgaben angelegt';
@override
String get settingsSectionNotifications => 'Benachrichtigungen';
@override
String get notificationsEnabledLabel => 'Tägliche Erinnerung';
@override
String get notificationsTimeLabel => 'Uhrzeit';
@override
String get notificationsPermissionDeniedHint =>
'Benachrichtigungen sind in den Systemeinstellungen deaktiviert. Tippe hier, um sie zu aktivieren.';
@override
String get notificationTitle => 'Dein Tagesplan';
@override
String notificationBody(int count) {
return '$count Aufgaben fällig';
}
@override
String notificationBodyWithOverdue(int count, int overdue) {
return '$count Aufgaben fällig ($overdue überfällig)';
}
}