Skip to content

Commit 70a5ae3

Browse files
committed
fix: use theme color for brightness mode compatibility
1 parent a699fd4 commit 70a5ae3

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

lib/widgets/nutrition/ingredient_dialogs.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class IngredientDetails extends StatelessWidget {
118118
Text(
119119
ingredient.brand!,
120120
style: Theme.of(context).textTheme.titleSmall?.copyWith(
121-
color: DefaultTextStyle.of(context).style.color?.withValues(alpha: 0.6),
121+
color: Theme.of(context).colorScheme.onSurfaceVariant,
122122
),
123123
),
124124
],

lib/widgets/nutrition/widgets.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ class _IngredientTypeaheadState extends ConsumerState<IngredientTypeahead> {
220220
TextSpan(
221221
text: ' ${ingredient.brand}',
222222
style: TextStyle(
223-
color: DefaultTextStyle.of(context).style.color?.withValues(alpha: 0.6),
223+
color: Theme.of(
224+
context,
225+
).colorScheme.onSurfaceVariant.withValues(alpha: 0.7),
224226
),
225227
),
226228
],

0 commit comments

Comments
 (0)