feat(11-02): render pre-populated tasks with muted visual distinction in calendar UI

- Add isPrePopulated parameter to CalendarTaskRow (default false, backward compat)
- Wrap ListTile in Opacity(0.55) when isPrePopulated to indicate upcoming tasks
- Render 'Demnächst' section in CalendarDayList with muted section header
- Update _buildAnimatedTaskRow to accept and forward isPrePopulated flag
- Update _CompletingTaskRow to accept isPrePopulated (always false during animation)
- Update celebration check to include prePopulatedTasks.isEmpty condition
- Update _completingTaskIds cleanup to also check prePopulatedTasks
This commit is contained in:
2026-04-03 21:26:53 +02:00
parent 9a67c51568
commit 8cbe989aeb
2 changed files with 44 additions and 4 deletions

View File

@@ -14,6 +14,10 @@ const _overdueColor = Color(0xFFE07A5F);
///
/// When [isOverdue] is true the task name uses coral text to visually
/// distinguish overdue carry-over from today's regular tasks.
///
/// When [isPrePopulated] is true the entire row is rendered at 0.55 opacity
/// to indicate it is not yet due (visible within interval window, but due
/// date is in the future).
class CalendarTaskRow extends StatelessWidget {
const CalendarTaskRow({
super.key,
@@ -22,6 +26,7 @@ class CalendarTaskRow extends StatelessWidget {
this.isOverdue = false,
this.showRoomTag = true,
this.canComplete = true,
this.isPrePopulated = false,
});
final TaskWithRoom taskWithRoom;
@@ -38,12 +43,16 @@ class CalendarTaskRow extends StatelessWidget {
/// When false, the checkbox is disabled (e.g. for future tasks).
final bool canComplete;
/// When true, the row is rendered at 0.55 opacity to indicate an
/// upcoming (not-yet-due) pre-populated task within its interval window.
final bool isPrePopulated;
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final task = taskWithRoom.task;
return ListTile(
final tile = ListTile(
onTap: () => context.go(
'/rooms/${taskWithRoom.roomId}/tasks/${taskWithRoom.task.id}',
),
@@ -79,5 +88,7 @@ class CalendarTaskRow extends StatelessWidget {
)
: null,
);
return isPrePopulated ? Opacity(opacity: 0.55, child: tile) : tile;
}
}