Refine: Enforce timer display constraints (seconds require minutes)
This commit is contained in:
@@ -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,
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user