feat(05-01): add CalendarDayState model, Riverpod providers, and l10n strings

- CalendarDayState: selectedDate, dayTasks, overdueTasks fields with isEmpty helper
- selectedDateProvider: NotifierProvider with SelectedDateNotifier, defaults to today
- calendarDayProvider: StreamProvider.autoDispose, overdue only when viewing today
- Add calendarTodayButton l10n string ("Heute") to ARB and generated dart files
This commit is contained in:
2026-03-16 21:24:07 +01:00
parent c666f9a1c6
commit 68ba7c65ce
5 changed files with 96 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
import 'package:household_keeper/features/home/domain/daily_plan_models.dart';
/// State for the calendar day view: tasks for the selected date + overdue tasks.
class CalendarDayState {
final DateTime selectedDate;
final List<TaskWithRoom> dayTasks;
final List<TaskWithRoom> overdueTasks;
const CalendarDayState({
required this.selectedDate,
required this.dayTasks,
required this.overdueTasks,
});
/// True when both day tasks and overdue tasks are empty.
/// Determined by the UI layer (completion state vs. no tasks at all
/// is handled in the widget based on this flag and history context).
bool get isEmpty => dayTasks.isEmpty && overdueTasks.isEmpty;
}