You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CupertinoSlider should provide haptic feedback #165847
CupertinoSlider doesn't have a haptic when reaching the min/max value, on native there is a haptic but it's a bit tricky, the strength of the haptic depends on how hard you "slam" the slider to the max or min, the harder the slam the harder the haptic.
Hello @Piinks ,
can I please try working on this issue ? Since this would be my first contribution here, could you please provide me with some hints / files to look out for the above request ?
Hi @SanjaySiddharth thanks for contributing! I have not looked into this issue, so I am sorry I cannot make a recommendation on how to resolve it. I would maybe look at other examples of haptic feedback being used in the framework. Feel free to share what you find here, or any thoughts you have for ways to resolve this. We're happy to give feedback early before folks start writing code. :)
Thanks for the heads up ! I found that the code for slider in iOS is present in cupertino folder and the haptic feedbacks can be called from the haptic_feedback file from services folder . My initial thoughts are :
we can track the time it takes for the slider to travel from 7.0 to 10.0 or 3.0 to 1.0 for hitting max / min values respectively. The values used in this point are purely suggestive.
the time taken can be used to classify if the impact is lightImpact , mediumImpact or heavyImpact ?
if the max or min values are not hit , we can set it to play the .selectionClick method instead ?
That sounds promising thank you! I will be sure to check out the PR as well! Curious, did you look into what the native behavior is or any documentation about it from Apple?
Hi @Piinks! I am the author of the PR but not the author of the comment. The issue was unassigned and no PR was linked so I started working on this. Didn't notice the comment, so I am sorry if someone was already working on another PR for this issue.
I tried looking through the Apple's documentation and HIG and haven't found the actual values that they use, so these are eyeballed values. We can tune them if you think I got them wrong.
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 flutter doctor -v and a minimal reproduction of the issue.
Activity
SanjaySiddharth commentedon Apr 5, 2025
Hello @Piinks ,
can I please try working on this issue ? Since this would be my first contribution here, could you please provide me with some hints / files to look out for the above request ?
Piinks commentedon Apr 7, 2025
Hi @SanjaySiddharth thanks for contributing! I have not looked into this issue, so I am sorry I cannot make a recommendation on how to resolve it. I would maybe look at other examples of haptic feedback being used in the framework. Feel free to share what you find here, or any thoughts you have for ways to resolve this. We're happy to give feedback early before folks start writing code. :)
SanjaySiddharth commentedon Apr 10, 2025
Hello @Piinks ,
Thanks for the heads up ! I found that the code for slider in iOS is present in cupertino folder and the haptic feedbacks can be called from the haptic_feedback file from services folder . My initial thoughts are :
Please let me know your views .
Piinks commentedon Apr 17, 2025
That sounds promising thank you! I will be sure to check out the PR as well! Curious, did you look into what the native behavior is or any documentation about it from Apple?
alex-medinsh commentedon Apr 18, 2025
Hi @Piinks! I am the author of the PR but not the author of the comment. The issue was unassigned and no PR was linked so I started working on this. Didn't notice the comment, so I am sorry if someone was already working on another PR for this issue.
I tried looking through the Apple's documentation and HIG and haven't found the actual values that they use, so these are eyeballed values. We can tune them if you think I got them wrong.
Add `CupertinoSlider` haptic feedback (#167362)
github-actions commentedon May 24, 2025
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
flutter doctor -vand a minimal reproduction of the issue.Add `CupertinoSlider` haptic feedback (#167362)
Add `CupertinoSlider` haptic feedback (#167362)