Resolve all lints and deprecation warnings

This commit is contained in:
2026-01-09 10:04:51 -06:00
parent 512577b092
commit a799e9cf59
56 changed files with 2819 additions and 3159 deletions

View File

@@ -97,12 +97,12 @@ class _CycleRingState extends State<CycleRing>
horizontal: 12, vertical: 6),
decoration: BoxDecoration(
color: _getPhaseColor(widget.phase)
.withOpacity(isDark ? 0.3 : 0.2),
.withValues(alpha: isDark ? 0.3 : 0.2),
borderRadius: BorderRadius.circular(20),
border: isDark
? Border.all(
color: _getPhaseColor(widget.phase)
.withOpacity(0.5))
.withValues(alpha: 0.5))
: null,
),
child: Row(
@@ -133,8 +133,9 @@ class _CycleRingState extends State<CycleRing>
: 'Period expected',
style: Theme.of(context).textTheme.bodySmall?.copyWith(
fontSize: 12,
color:
Theme.of(context).colorScheme.onSurfaceVariant,
color: Theme.of(context)
.colorScheme
.onSurfaceVariant,
),
),
],
@@ -181,8 +182,8 @@ class _CycleRingPainter extends CustomPainter {
// Background arc
final bgPaint = Paint()
..color =
(isDark ? Colors.white : AppColors.lightGray).withOpacity(isDark ? 0.05 : 0.1)
..color = (isDark ? Colors.white : AppColors.lightGray)
.withValues(alpha: isDark ? 0.05 : 0.1)
..style = PaintingStyle.stroke
..strokeWidth = strokeWidth
..strokeCap = StrokeCap.round;
@@ -235,16 +236,12 @@ class _CycleRingPainter extends CustomPainter {
return [
AppColors.sageGreen,
AppColors.follicularPhase,
AppColors.sageGreen.withOpacity(0.7)
AppColors.sageGreen.withValues(alpha: 0.7)
];
case CyclePhase.ovulation:
return [AppColors.lavender, AppColors.ovulationPhase, AppColors.rose];
case CyclePhase.luteal:
return [
AppColors.lutealPhase,
AppColors.lavender,
AppColors.blushPink
];
return [AppColors.lutealPhase, AppColors.lavender, AppColors.blushPink];
}
}