2

Main Issue:- Slider onChangeStart not work when used GestureDetector.

              GestureDetector(
                  behavior: HitTestBehavior.translucent,
                  child: Slider(
                    value: value.validate().toInt().toDouble(),
                    min: 1,
                    max: 8,
                    onChanged: (v){},
                    onChangeStart: (v) {
                      value = v.toInt();
                    },
                  ),
                )
swaroop suthar
  • 632
  • 3
  • 19
  • By not working , what do you exactly mean ? Are you getting any error ? What you want to accomplish and where are you stuck , can you please be little more descriptive ... – krishnaacharyaa Jun 22 '22 at 11:52
  • Did you mean `value = v.toInt();` is not setting the value or setting the state? If yes, what state management are you using? Is it just StatefulWidget? – Minjin Gelegdorj Jun 23 '22 at 09:57
  • 1
    can you elaborate on what you are trying to achieve? onChangeStart event gets triggered, so what exactly is the issue you are facing and what is the datatype definition for the variable value? – Prabhakaran Jun 24 '22 at 18:08
  • May this help [Slider notifies "onChangeEnd" twice when it is over a InkWell/GestureDetector](https://github.com/flutter/flutter/issues/28115) – Eskandar Abedini Jun 28 '22 at 18:33

0 Answers0