New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slider onChangeEnd
is never called when arrow keys are used.
#123315
Comments
@git-n-pissed Also, take a look at this SO link and see if it helps in your case. |
Apologizes, the code I provided was missing the closing bracket for Thank you for the SO link, but I do not believe adding a delay as suggested in that link will be helpful in this case since the |
Thanks for the update. I was able to replicate this on mobile platform (iOS). Upon running code sample and clicking on slider, the stable, master flutter doctor -v
|
onChangeEnd
is never called when arrow keys are used (Windows)onChangeEnd
is never called when arrow keys are used.
Hi, I was looking into this issue and saw that using the arrow key only fires the onChanged callback and neither onChangeStart or onChangeEnd callback. I am brand new at trying to contribute, any tips on where I could look to resolve this? I am wondering if its somewhere in this slider class I am looking over or if it might be in the gestures package. Thanks for any guidance you can give. |
I have something that may work as a fix? I'm wondering what people think. here is a gif of it. Basically every time you press a key there is a call to onChangeStart, then onChanged is called like before, then onChangeEnd is called with the value of the spot you landed at. I did not implement something like a drag however, if you hold a key it will call all three callbacks per position switch. |
@darshankawar, good morning, I was wondering if you could check out my comments on this issue and give feedback. Also, was wondering you had the ability to assign me this issue. Thanks for your time. |
@TahaTesser Hi, I noticed that you were assigned the umbrella of Slider issues. Is there a way you could assign this issue in particular to me? |
Hi, I recommend taking a look at another issue. This will be fixed part as part of a bigger project under #125329 |
Thanks @TahaTesser just doing this for education purposes. I have begun to look and start working on fixes for other issues as well. |
…ard shortcuts (#126896) fixes #123315 -------- This PR makes changes to the _actionHandler function used on the Slider.Dart Widget for Key Events. It ensures onChangeStart is called at the beginning of a Key Event and onChangeEnd at the end of one. This PR includes a test for the changes made. I ran all existing tests after my changes were made and they passed.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to Reproduce
flutter run
on the code sampleonChangeEnd
is never called. Only tested on Windows 10.Expected results:
onChangeEnd
should be called at the end of every slider change, regardless how it is triggered. With arrow keys, I would expectonChangeEnd
to be called when the arrow key is released.Actual results:
onChangeEnd
is never called when the arrow keys are used.Code sample
The text was updated successfully, but these errors were encountered: