ml-opensource / ml-opensource/flutter-template
Introduce & Standardize a way to play Haptics
@nivisi is already working on this.
Since May 12, 2023.
- Dominant language
- Dart
- Stars
- 37
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
Vibration is quite a common thing for mobile apps. Triggered from pull to refresh, on tap on specific buttons like pin buttons, on error or whatsoever — it enhances UX for a user. There's a good article in the human interface guidelines about playing haptics.
On the native side we're getting this... Uhm natively with the native components, but on Flutter, we don't. It expands the list of things that make Flutter apps feel "off". But it's quite easy to exclude from the list.
There is a good package, flutter_vibrate. It supports playing custom vibration as well as using the predefined native vibrations, like error, success etc. I propose to add a class with static method that encapsulates usage of this package, and also to define guidelines on when we should add vibration and what exact vibration.
What I can think of at the moment:
- Pinpad keyboard — light
- Pin validation error — error
- Pull to refresh, when it's armed — light
- When a switch is toggled — light
- On long press — light
Of course we should standardize it as much as possible so devs are not bothered with adding this themselves. Plus, it will guarantee that we're always covering vibration for the same components all across the app.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.