-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Feedback.forLongPress does not provide feedback on iOS #148391
Comments
Labeling for further insight from the team. I do feel some vibration when I long press in an app like flutter doctor -v
|
Currently, `Feedback` exists in the Material layer. However, not only is `Feedback` not material-opinionated, but it is an abstract class that defines its functionality depending on the user's platform. It makes sense that `Feedback` should exist in the widgets layer instead. This makes it easier to incorporate platform specific `Feedback` updates as they arrive, fixing issues like #148391. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat [Data Driven Fixes]: https://github.com/flutter/flutter/wiki/Data-driven-Fixes
Making the 'tap' sound should be done in I found this library that contains relevant iOS system sounds. |
Actually, on further investigation, the tap sound is the same sound as |
@victorsanni I tried comparing the keyboard click sound and the haptic click sound, they're not the same sound if I'm not wrong. |
@MaherSafadii could you share more information or a video? I was looking into AudioServices and I think the audio file played both on long presses and key presses on iOS is |
Adds the click system sound and heavy-impact haptic feedback to iOS on long presses. Fixes #148391
Adds the click system sound and heavy-impact haptic feedback to iOS on long presses. Fixes flutter#148391
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
Execute Feedback.forLongPress on an iOS device.
Or run the example on iOS and long press the screen.
Notice that it prints "Long-press started" to the console, but there is no feedback.
Expected results
Should provide haptic feedback. The documentation says "On iOS this is a no-op as that platform usually doesn't provide feedback for long presses.", however this is wrong from my point of view.
iOS gives feedback for long presses, for example when long pressing on a photo in the Photos app, or long pressing on a message in iMessage. The feedback includes a "tap" Sound, when sounds are enabled, and haptic feedback similar to
HapticFeedback.heavyImpact()
.I am not an iOS guy, so I would appreciate it if an iOS guy can provide his opinion on this topic.
Actual results
Does not provide haptic feedback and sound.
Code sample
Code sample
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: