Skip to content

Commit 62df228

Browse files
committed
refactor: standardize color usage in goal, habit, and task cards
1 parent aaa9065 commit 62df228

3 files changed

Lines changed: 4 additions & 9 deletions

File tree

lib/widgets/lockin_goal_card.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class GoalCard extends StatelessWidget {
101101
icon: isFinished
102102
? Icons.cancel_outlined
103103
: Icons.check_circle_outline,
104-
color: isFinished ? scheme.onSurfaceVariant : scheme.onSurface,
104+
color: scheme.onSurface,
105105
tooltip: isFinished ? 'Finished' : 'Mark as finished',
106106
onPressed: (onFinish != null && !isFinished)
107107
? () => onFinish!(index)

lib/widgets/lockin_habit_card.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class HabitCard extends StatelessWidget {
6666
ActionIconButton(
6767
icon: Icons.check_circle_outline,
6868
color: isDoneToday(habit, lastDone)
69-
? scheme.onSurfaceVariant
69+
? scheme.onSurface.withValues(alpha: 0.38)
7070
: scheme.onSurface,
7171
tooltip: 'Mark as done',
7272
onPressed: isDoneToday(habit, lastDone) ? null : onMarkDone,

lib/widgets/lockin_task_card.dart

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,8 @@ class LockinTaskCard extends StatelessWidget {
7272
title: Text(
7373
task.title,
7474
style: textTheme.titleMedium?.copyWith(
75-
color: finished
76-
? scheme.onSurface.withValues(alpha: 0.7)
77-
: scheme.onSurface,
75+
color: scheme.onSurface,
7876
height: 1.15,
79-
decoration: task.completed ? TextDecoration.lineThrough : null,
8077
decorationColor: scheme.onSurface,
8178
letterSpacing: 0.1,
8279
),
@@ -86,9 +83,7 @@ class LockinTaskCard extends StatelessWidget {
8683
icon: task.completed
8784
? Icons.cancel_outlined
8885
: Icons.check_circle_outline,
89-
color: task.completed
90-
? scheme.onSurfaceVariant
91-
: scheme.onSurface,
86+
color: scheme.onSurface,
9287
tooltip: task.completed ? 'Completed' : 'Mark as done',
9388
onPressed: () {
9489
final isCompleted = !task.completed;

0 commit comments

Comments
 (0)