refactor: update color opacity methods to use withValues for consistency

This commit is contained in:
2025-08-31 18:32:57 +02:00
parent 62debb6a7c
commit 6a2085f4e6
13 changed files with 38 additions and 319 deletions

View File

@@ -480,7 +480,7 @@ class _HistoryScreenState extends State<HistoryScreen> {
'${dayIntakes.length} supplement${dayIntakes.length != 1 ? 's' : ''} taken',
style: TextStyle(
fontSize: isWideScreen ? 16 : 14,
color: Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.8),
color: Theme.of(context).colorScheme.onPrimaryContainer.withValues(alpha: 0.8),
),
),
],
@@ -554,10 +554,10 @@ class _HistoryScreenState extends State<HistoryScreen> {
margin: const EdgeInsets.only(bottom: 12),
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
decoration: BoxDecoration(
color: color.withOpacity(0.1),
color: color.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: color.withOpacity(0.3),
color: color.withValues(alpha: 0.3),
width: 1,
),
),
@@ -566,7 +566,7 @@ class _HistoryScreenState extends State<HistoryScreen> {
Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: color.withOpacity(0.2),
color: color.withValues(alpha: 0.2),
shape: BoxShape.circle,
),
child: Icon(
@@ -594,7 +594,7 @@ class _HistoryScreenState extends State<HistoryScreen> {
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w500,
color: color.withOpacity(0.8),
color: color.withValues(alpha: 0.8),
),
),
],