2024-10-07 12:41:28 +00:00
|
|
|
// import 'package:discover_module/ui_screen/interactionform/util.dart';
|
|
|
|
import 'package:discover_module/contacts_module/ui_screen/interactionform/util.dart';
|
2024-05-20 10:29:02 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
// ignore: must_be_immutable
|
|
|
|
class CustomRangeSlider extends StatelessWidget {
|
|
|
|
final double sliderPos;
|
|
|
|
final void Function(double) onChanged;
|
|
|
|
double? min;
|
|
|
|
double? max;
|
|
|
|
|
|
|
|
CustomRangeSlider(
|
|
|
|
{super.key,
|
|
|
|
required this.sliderPos,
|
|
|
|
required this.onChanged,
|
|
|
|
this.max,
|
|
|
|
this.min});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
SizedBox(
|
|
|
|
height: isTablet ? 40 : 40,
|
|
|
|
child: Slider(
|
|
|
|
activeColor: const Color(0xFF2b9af3),
|
|
|
|
onChanged: onChanged,
|
|
|
|
min: min ?? 10.0,
|
|
|
|
max: max ?? 80.0,
|
|
|
|
label: sliderPos.toInt().toString(),
|
|
|
|
divisions: 48,
|
|
|
|
value: sliderPos,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
height: isTablet ? 1 : 1,
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
"Range: ${sliderPos.toInt()}",
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: isTablet ? 14.0 : 12,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|