Home > Software design >  Flutter sleek_circular_slider full circle
Flutter sleek_circular_slider full circle

Time:09-29

I'm using sleek_circular_slider package, but i don't know how to be the widget as circle, by default it is not

enter image description here

final slider = SleekCircularSlider(
  appearance: CircularSliderAppearance(
    customWidths: CustomSliderWidths(progressBarWidth: 10)),
  min: 10,
  max: 28,
  initialValue: 14,
);

CodePudding user response:

The package documentation states that the slider object takes an appearance parameter of type CircularSliderAppearance. You can then set angleRange as a parameter on the appearance to get whatever range you require. By default docs state it is 240 degrees.

To get a complete circle, the code would look something like:

final slider = SleekCircularSlider(
    appearance: CircularSliderAppearance(angleRange: 360),
        onChange: (double value) {
            print(value);
        });
  • Related