https://github.com/istornz/flutter_gaimon
A Flutter plugin to fully support Haptic feedback with custom pattern 📳
https://github.com/istornz/flutter_gaimon
android dart flutter flutter-plugin haptic-feedback ios
Last synced: about 1 month ago
JSON representation
A Flutter plugin to fully support Haptic feedback with custom pattern 📳
- Host: GitHub
- URL: https://github.com/istornz/flutter_gaimon
- Owner: istornz
- License: mit
- Created: 2022-01-28T15:22:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-20T08:46:47.000Z (5 months ago)
- Last Synced: 2025-03-27T06:34:35.136Z (about 2 months ago)
- Topics: android, dart, flutter, flutter-plugin, haptic-feedback, ios
- Language: Dart
- Homepage:
- Size: 631 KB
- Stars: 33
- Watchers: 1
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
## 🧐 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.
```dart
import 'package:gaimon/gaimon.dart';
```- Trigger haptic 📳.
```dart
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](https://ahap.fancypixel.it/) 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
- [x] Support pattern for Android (send `.ahap` file & convert it to waveform).
- [x] Parse .ahab json contents
- [x] Convert events in pattern to waveform
- [x] Send waveform to android native plugin to simulate waveform
- [x] Add support for parameters (https://developer.apple.com/documentation/corehaptics/representing-haptic-patterns-in-ahap-files)
- [x] 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 🎉.