Haptic Feedback
Using this action, you can vibrate the user's device. Typically this is used to draw users' attention to the action they have performed. For example, vibrating the user's device on setting the alarm.
Types of Haptic Feedback
Depending on the action a user has performed (e.g., bookmark an item, on-off flashlight), you can set the different vibration intensity and duration types.
Here are the types of haptic feedback:
- Light: This creates a very low-intensity vibration similar to pressing a virtual on-screen key.
- Medium: This creates a medium-intensity vibration similar to pressing a key on a keyboard.
- Heavy: This creates a high-intensity vibration similar to clicking an item.
- Selection Click: This vibrates the device when selection changes through discrete values. Similar to changing hours and minutes on the clock app.
- Vibrate: This creates a vibration for a short duration.
warning
- The Light, Medium, Heavy, and Selection Click, these types of haptic feedback only work on iOS version 10 and above.
- The Selection Click type only works on Android API levels 23 and above.
Adding Haptic Feedback [Action]
Go to your project page on FlutterFlow and follow the steps below to define the Action to any widget.
- Select the Widget (e.g., Button) on which you want to define the action.
- Select Actions from the Properties panel (the right menu), and click + Add Action.
- Search and select the Haptic Feedback (under Alerts/Notifications) action.
- Set the Feedback Type among the Light, Medium, Heavy, Selection Click, and Vibrate.