2

This is the picture

I want the valueindicator to show value even not pressing or moving the slider.

halfer
  • 19,824
  • 17
  • 99
  • 186

2 Answers2

0

If https://pub.dev/packages/flutter_range_slider is the package you're referring to, I think you should set showValueIndicator to ShowValueIndicator.always in your SliderTheme.

Like this, taken from the example:

SliderTheme(
              // Customization of the SliderTheme
              // based on individual definitions
              // (see rangeSliders in _RangeSliderSampleState)
              data: SliderTheme.of(context).copyWith(
                showValueIndicator: ShowValueIndicator.always,
              ),
              child: frs.RangeSlider(
                //...
              ),
            ),
Er1
  • 2,559
  • 1
  • 12
  • 24
  • why this package is not working. I added prefix, still having an error when running the project. – Mirana Nightshade Jun 05 '20 at 10:25
  • 1
    @MiranaNightshade: please edit your question to show the code you have now. – halfer Jun 05 '20 at 11:28
  • @MiranaNightshade the prefix `frs` is not necessary. It is used like that in the example of the package. – Er1 Jun 05 '20 at 13:05
  • 2
    I am also having an issue with `showValueIndicator: ShowValueIndicator.always` - it is not always showing the value indicators! (only while dragging) - any ideas how to keep them on display? – user1048175 Jul 27 '20 at 00:11
  • @user1048175 I think this is just the way it works. You could file a new issue at the github with your issues/feature request. – Er1 Jul 27 '20 at 08:52
  • Did you find a solution for this? – David Papirov Nov 26 '20 at 12:14
0

I was trying to display the value label even when the knob is released (for normal, non-range Slider). As pointed out here, showValueIndicator is not used to control the value indicator visibility when the knob is handled. Possible Workaround

X0Rz1st
  • 1
  • 2
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 22 '22 at 10:11