slidingControl method
Implementation
Widget slidingControl(
int initialValue, Function(int) onChange, BuildContext context,
{bool isStretch = true,
required Map<int, Widget> children,
double height = 60}) {
return SizedBox(
height: height,
child: CustomSlidingSegmentedControl<int>(
initialValue: initialValue,
isStretch: isStretch,
height: height,
children: children,
decoration: BoxDecoration(
color:
Theme.of(context).textTheme.bodyMedium!.color!.withOpacity(0.1),
borderRadius: BorderRadius.circular(DUI.spacing.borderRadius + 2),
),
thumbDecoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
borderRadius: BorderRadius.circular(DUI.spacing.borderRadius - 0.5),
),
duration: const Duration(milliseconds: 300),
curve: Curves.easeInToLinear,
onValueChanged: (v) {
onChange(v);
},
),
);
}