matthewfx / sleek_circular_slider

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

Decouple progress bar width and touchable area: add `minimumTouchWidth` argument #79

Open tony-ditchlabs opened 2 years ago

tony-ditchlabs commented 2 years ago

Use case: When the user taps near, but not directly on, the progress bar, the widget doesn't update.

The problem: In the _onPanDown and _handlePan methods, the touchWidth is defined as the greater of 25.0 or the progress bar width

The fix: Change the number 25.0 to an argument in the constructor, minimumTouchWidth. This will let the designer/developer decide the fault tolerance for the slider. Setting it to double.infinity will ensure that every gesture is captured.