step_slider 1.0.0+1 step_slider: ^1.0.0+1 copied to clipboard
Flutter slider widget that snaps to given step values and notifies each step change.
step_slider #
Flutter slider widget that snaps to given step values and notifies about step changes.
Getting Started #
Add StepSlider to your widget tree along with needed custom arguments:
@override
Widget build(BuildContext context) {
...
child: StepSlider(
min: 100.0,
max: 200.0,
steps: {110, 150, 160, 195},
initialStep: 150,
animCurve: Curves.bounceInOut,
animDuration: Duration(seconds: 1),
snapMode: SnapMode.value(10),
hardSnap: true,
onStepChanged: (it) => print('Step changed to $it.'),
// ... slider's other args
),
}