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

@@ -3,6 +3,8 @@ import 'package:flutter/material.dart' show TimeOfDay;
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:timezone/timezone.dart' as tz;
import 'package:household_keeper/core/router/router.dart';
class NotificationService {
static final NotificationService _instance = NotificationService._internal();
factory NotificationService() => _instance;
@@ -74,6 +76,6 @@ class NotificationService {
}
static void _onTap(NotificationResponse response) {
// Navigation to Home tab — wired in Plan 02 via global navigator key
router.go('/');
}
}