gaimon 1.4.1
gaimon: ^1.4.1 copied to clipboard
A Flutter plugin to fully support Haptic feedback with custom pattern.
π§ What is it ? #
Gaimon is a very simple & easy to use plugin to include Haptic feedback in your app. It support custom pattern with .ahap file support.
π» Getting started #
- Import the plugin.
import 'package:gaimon/gaimon.dart';
- Trigger haptic π³.
Gaimon.selection();
Gaimon.success();
Gaimon.error();
// [...]
Quite simple right ? π
π Documentation #
| Name | Description | Android | iOS |
|---|---|---|---|
.canSupportsHaptic() |
Check if haptic are supported or not | β | β |
.selection() |
Use it on a tap event | β | β |
.error() |
Use it when an error occur | β | β |
.success() |
Use it when a successful event occur | β | β |
.warning() |
Use it when a warning event occur | β | β |
.heavy() |
Huge feedback | β | β |
.medium() |
Medium feedback | β | β |
.light() |
Light feedback | β | β |
.rigid() |
A huge but speed feedback | β | β |
.soft() |
A medium but speed feedback | β | β |
.pattern(String data) |
Read a custom .ahap file (you can use Captain AHAP to generate file) |
β | β |
β FAQ #
-
Why custom pattern is not working on my iPhone?
Custom vibration patterns is only supported on iPhone 8 and newer devices.
π― Roadmap #
- β
Support pattern for Android (send
.ahapfile & convert it to waveform).- β Parse .ahab json contents
- β Convert events in pattern to waveform
- β Send waveform to android native plugin to simulate waveform
- β Add support for parameters (https://developer.apple.com/documentation/corehaptics/representing-haptic-patterns-in-ahap-files)
- β Add support for Parameter curves
- β Add support for AttackTime
- β Add support for DecayTime
- β Add support for Sustained Events
- β Support audio file to haptic feedback (generate correct feedback for audio file).
π₯ Contributions #
Contributions are welcome. Contribute by creating a PR or create an issue π.
