Jarvis
Jarvis

Reputation: 1792

How to create custom slider in flutter

I want to change the slider value indicator to like below.

enter image description here

I am not able to get the idea of how to use a custom painter to create bubble.

Upvotes: 1

Views: 1844

Answers (1)

Mazin Ibrahim
Mazin Ibrahim

Reputation: 7869

Create a custom RangeSliderValueIndicatorShape by implementing it, and provide it to SliderThemeData of your SliderTheme, which is having your RangeSlider as a child:

SliderTheme(
        data: SliderThemeData(
          rangeValueIndicatorShape: Your_Implemented_RangeSliderValueIndicatorShape(),
        ),
        child: RangeSlider(
            values: RangeValues(10, 100),
            onChanged: null
        ),

Upvotes: 3

Related Questions