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:
19
lib/features/home/domain/calendar_models.dart
Normal file
19
lib/features/home/domain/calendar_models.dart
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user