Refine: Enforce timer display constraints (seconds require minutes)

This commit is contained in:
2026-01-02 18:22:50 -06:00
parent f54222d26a
commit 02d25d0cc7
2 changed files with 23 additions and 7 deletions

View File

@@ -199,7 +199,14 @@ class _SuppliesSettingsScreenState extends ConsumerState<SuppliesSettingsScreen>
style: GoogleFonts.outfit(fontWeight: FontWeight.w500, color: AppColors.charcoal),
),
value: _showPadTimerMinutes,
onChanged: (val) => setState(() => _showPadTimerMinutes = val),
onChanged: (val) {
setState(() {
_showPadTimerMinutes = val;
if (!val) {
_showPadTimerSeconds = false;
}
});
},
activeColor: AppColors.menstrualPhase,
),
@@ -207,10 +214,13 @@ class _SuppliesSettingsScreenState extends ConsumerState<SuppliesSettingsScreen>
contentPadding: EdgeInsets.zero,
title: Text(
'Show Seconds',
style: GoogleFonts.outfit(fontWeight: FontWeight.w500, color: AppColors.charcoal),
style: GoogleFonts.outfit(
fontWeight: FontWeight.w500,
color: _showPadTimerMinutes ? AppColors.charcoal : AppColors.warmGray
),
),
value: _showPadTimerSeconds,
onChanged: (val) => setState(() => _showPadTimerSeconds = val),
onChanged: _showPadTimerMinutes ? (val) => setState(() => _showPadTimerSeconds = val) : null,
activeColor: AppColors.menstrualPhase,
),
],