opt slider color picker

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-23 12:21:33 +08:00
parent b1666095a6
commit 5452b3de4f

View File

@@ -53,18 +53,34 @@ class _SlideColorPickerState extends State<SlideColorPicker> {
return Row(
children: [
const SizedBox(width: 16),
Text(title),
SizedBox(
width: MediaQuery.textScalerOf(context).scale(16),
child: Text(title),
),
const SizedBox(width: 12),
Expanded(
child: Slider(
min: 0,
max: 255,
divisions: 255,
value: value.toDouble(),
onChanged: onChanged,
child: SliderTheme(
data: SliderTheme.of(context).copyWith(
trackHeight: 10,
thumbSize: WidgetStateProperty.all(const Size(4, 25)),
),
child: Slider(
padding: EdgeInsets.zero,
min: 0,
max: 255,
divisions: 255,
value: value.toDouble(),
onChanged: onChanged,
),
),
),
Text(
value.toString(),
const SizedBox(width: 12),
SizedBox(
width: MediaQuery.textScalerOf(context).scale(25),
child: Text(
value.toString(),
textAlign: TextAlign.end,
),
),
const SizedBox(width: 16),
],