buildSliderSetting function
Implementation
Widget buildSliderSetting(
StringEnum title,
double value,
Function(double) onChanged,
) {
final stringObs = TCICController.instance.getStringObs();
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
stringObs.getString(title),
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
),
Text(
'${(value * 100).toInt()}%',
style: TextStyle(color: Colors.grey[600]),
),
],
),
const SizedBox(height: 8),
Slider(value: value, onChanged: onChanged),
],
);
}