matthewfx / sleek_circular_slider

Sleek circular slider for Flutter
MIT License
524 stars 102 forks source link

Tap on circle without a track should not be registered as a tap #16

Closed cirediew closed 4 years ago

cirediew commented 4 years ago

I'm not sure if this is intended or not, but when I tap on the circle where no track is drawn I expect it to be ignored. Is this intended, a bug, or am I doing something wrong?

This is my code.

SleekCircularSlider(
            appearance: CircularSliderAppearance(
              animationEnabled: false,
              size: 300,
              customWidths: CustomSliderWidths(
                handlerSize: 20,
                trackWidth: 10,
                shadowWidth: 0,
                progressBarWidth: 10,
              ),
              customColors: CustomSliderColors(
                dotColor: Theme.of(context).accentColor,
                trackColor: Theme.of(context).disabledColor,
                progressBarColors: temperatureGradient.colors.reversed
                    .toList(),
              ),
            ),
            innerWidget: (sliderValue) => SliderInnerWidget(sliderValue),
            min: 8,
            max: 28,
            initialValue: climateControllerHelper.setpoint,
            onChange: (v) {
              LOG.info("Change: $v");
            },
            onChangeStart: (v) {
              LOG.info("Start: $v");
            },
            onChangeEnd: (double value) {
              doThings(value);
            },
          )
matthewfx commented 4 years ago

Hi, when you tap on the track it sets the bar to to that position and it's an intented behavior. I might add it as an option in some future updates.

matthewfx commented 4 years ago

Closing it for now.

cirediew commented 4 years ago

@matthewfx I get what you’re saying when I click on the track. But the value also changes for me when I click on the “circle” where no track is drawn.

matthewfx commented 4 years ago

OK I will look at it when I have some time but can't promise it will be this week

cirediew commented 4 years ago

Hi @matthewfx do you have any idea when you can take a look?

matthewfx commented 4 years ago

It has been fixed in v. 1.2