Home > Blockchain >  Flutter Circular Slider
Flutter Circular Slider

Time:10-31

I'm using the Sleek_circular_Slider and was wondering if there is a way of changing the value/position of the slider from an external button press? I cant seem to see the value that it would be setting to change it. Code: Widget controlIndicator() { return SleekCircularSlider( min: 0, max: 100, initialValue: 4, innerWidget: (value) { return sliderCenterWidget(); }, appearance: CircularSliderAppearance( spinnerMode: false, animationEnabled: true, size: 250, customColors: CustomSliderColors( dotColor: dark_grey, shadowColor: dark_grey, shadowMaxOpacity: 0.2, shadowStep: 5, progressBarColor: red, trackColor: grey), customWidths: CustomSliderWidths( trackWidth: 7, progressBarWidth: 12, handlerSize: 8)), onChange: (value) { slider_value = value.round(); print(value); }); }

CodePudding user response:

did you try to set the initialValue as a variable? then change this var value on button press

  • Related