dehancer_slider 1.0.0 dehancer_slider: ^1.0.0 copied to clipboard
Dehancer Slider package
dehancer_slider #
![License: MIT][license_badge]
Dehancer Slider is a Flutter package that provides configurable and easy to use slider UI value picker.
Getting Started #
Add the package reference to pubspec.yaml #
Two ways to add the package to your pubspec:
- (Recommend) Run
flutter pub add dehancer_slider
. - Add the package reference in your
pubspec.yaml
'sdependencies
section:
dependencies:
...
dehancer_slider: $latest_version
Import in your projects #
import 'package:dehancer_slider/dehancer_slider.dart';
Usage Examples #
Slider with values from 0 to 100 #
DehancerSlider(
minValue: 0,
maxValue: 100,
defaultValue: 0,
startValue: 0,
value: 0,
)
Slider with values from -3 to 3 #
DehancerSlider(
minValue: -3,
maxValue: 3,
defaultValue: 0,
startValue: 0,
value: 0,
)
Slider with values from 0 to 100 and default value 20 #
Default value is a value that will be used on reset (on double tap)
DehancerSlider(
minValue: 0,
maxValue: 100,
defaultValue: 20,
startValue: 0,
value: 0,
)
Slider with values from 0 to 100 and start value 20 #
Default value is a value that will displayed as a marker on track
DehancerSlider(
minValue: 0,
maxValue: 100,
defaultValue: 0,
startValue: 20,
value: 0,
onValueChanged: (value) {
},
)
Slider with values from 0 to 100 and value change handlers #
DehancerSlider(
minValue: 0,
maxValue: 100,
defaultValue: 0,
startValue: 0,
value: 0,
onValueChangeStarted: (value) {
},
onValueChanged: (value) {
},
)
Slider with values from 0 to 100 and scroll change handler #
This handler might be used to block vertical scrolling while user changes slider value. Check example for more information.
DehancerSlider(
minValue: 0,
maxValue: 100,
defaultValue: 0,
startValue: 0,
value: 0,
onScrollingChanged: (isChanging) {
},
)