mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 18:16:21 +00:00
push toggle buttons color
This commit is contained in:
@ -70,19 +70,41 @@ class _AlertDialogSliderStepsState extends State<AlertDialogSliderSteps> {
|
||||
selectedColor: Colors.white,
|
||||
color: ColorsManager.blackColor,
|
||||
fillColor: ColorsManager.primaryColorWithOpacity,
|
||||
constraints: const BoxConstraints(minHeight: 30, minWidth: 30),
|
||||
children: const [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 30.0),
|
||||
child: Text("<"),
|
||||
borderColor: ColorsManager.greyColor,
|
||||
constraints: BoxConstraints.tight(const Size(70, 30)),
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 70,
|
||||
height: 30,
|
||||
child: Container(
|
||||
color: selectedToggleIndex == 0
|
||||
? ColorsManager.primaryColorWithOpacity
|
||||
: ColorsManager.greyColor,
|
||||
alignment: Alignment.center,
|
||||
child: const Text("<"),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 30.0),
|
||||
child: Text("="),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 30.0),
|
||||
child: Text(">"),
|
||||
SizedBox(
|
||||
width: 70,
|
||||
height: 30,
|
||||
child: Container(
|
||||
color: selectedToggleIndex == 1
|
||||
? ColorsManager.primaryColorWithOpacity
|
||||
: ColorsManager.greyColor,
|
||||
alignment: Alignment.center,
|
||||
child: const Text("="),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 70,
|
||||
height: 30,
|
||||
child: Container(
|
||||
color: selectedToggleIndex == 2
|
||||
? ColorsManager.primaryColorWithOpacity
|
||||
: ColorsManager.greyColor,
|
||||
alignment: Alignment.center,
|
||||
child: const Text(">"),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -97,7 +119,11 @@ class _AlertDialogSliderStepsState extends State<AlertDialogSliderSteps> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
TitleMedium(
|
||||
text: groupValue?.toStringAsFixed(1) ?? "0",
|
||||
text: groupValue != null
|
||||
? (groupValue! % 1 == 0
|
||||
? groupValue!.toStringAsFixed(0)
|
||||
: groupValue!.toStringAsFixed(1))
|
||||
: "0",
|
||||
style: context.titleMedium.copyWith(
|
||||
color: ColorsManager.primaryColorWithOpacity,
|
||||
fontSize: 30,
|
||||
@ -114,11 +140,14 @@ class _AlertDialogSliderStepsState extends State<AlertDialogSliderSteps> {
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Slider(
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Slider(
|
||||
value: groupValue ?? 0,
|
||||
min: operation.minValue?.toDouble() ?? 0,
|
||||
max: operation.maxValue?.toDouble() ?? 0,
|
||||
inactiveColor: ColorsManager.primaryColorWithOpacity,
|
||||
inactiveColor: ColorsManager.primaryColorWithOpacity
|
||||
.withOpacity(0.2),
|
||||
divisions: operation.stepValue != null
|
||||
? ((operation.maxValue!.toDouble() -
|
||||
operation.minValue!.toDouble()) /
|
||||
@ -131,6 +160,7 @@ class _AlertDialogSliderStepsState extends State<AlertDialogSliderSteps> {
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
],
|
||||
);
|
||||
|
Reference in New Issue
Block a user