-
-
Notifications
You must be signed in to change notification settings - Fork 44
Description
Before Flutter 3.27.0
Before upgrading to Flutter 3.27.0, the opacity slider in FlexColorPicer behaved like this, when using different track height and thumb sizes:
Screen.Recording.2024-12-13.at.20.52.38.mov
This can be tested and verified with the web demo build made with Flutter version 3.24.3, published here:
https://rydmike.com/flexcolorpicker3-6-0/
After Flutter 3.27.0 upgrade
With Flutter 3.27.0 there is new extra padding around the opacity slider.
Screen.Recording.2024-12-13.at.20.56.27.mov
-
The used opacity Slider is discrete, using 255 steps in an opacity range from 0 to 1, where the steps thus correspond to all possible values in the 8-bit Alpha value in a ARGB color value.
-
The used custom slider track
OpacitySliderTrackextendsSliderTrackShape -
The used custom slider thumb
OpacitySliderThumbextendsRoundSliderThumbShape
Suggested and tried fixes
The following fix was tried together with @TahaTesser
Remove thumbRadius compensation in shapeRect
This removes half of the extra padding, but not all as desired and needed to match the past custom design.
| FIX ATTEMPT | CORRECT DESIGN |
|---|---|
![]() |
![]() |
The fix did not work and it also made the thumb no longer track the mouse and jump when it is pushed:
Screen.Recording.2024-12-13.at.21.22.12.mov
EDIT: This jump on push also happens without the above FIX attempt when using Flutter 3.27.0. It does not happen on the Flutter 3.24.3 build.
Fix PRs welcome!
Please submit any fix PRs to https://github.com/rydmike/flex_color_picker


