advanced_haptics
1.2.0, released 2 months ago by fendomoney.com
Play custom haptic feedback patterns, waveforms, and Apple Core Haptics .ahap files across Android and iOS.
What it does
Advanced Haptics is a Flutter plugin that offers a unified API for custom haptic feedback, waveforms, Android composition primitives, and iOS .ahap files. It supports capability checks, pattern building with intensity and sharpness controls, and fallback behaviors for unsupported hardware.
AI-written summary of version 1.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want custom haptic waveforms and patterns on both Android and iOS.
- You need to play iOS Core Haptics .ahap files from app assets.
- You want a unified API for fine-grained vibration control with graceful platform fallbacks.
Skip it when
- You only need basic, default haptics already covered by standard platform triggers.
- Your target devices lack vibrators or support for advanced haptics and you require guaranteed complex feedback everywhere.
Strengths
- Unified cross-platform API for custom patterns, intensities, and sharpness.
- Supports iOS Core Haptics .ahap files and Android composition primitives.
- Graceful fallbacks and capability checking for unsupported hardware and older OS versions.
Weaknesses
- Some advanced features like composition primitives and AHAP playback have strict minimum OS/API version requirements.
- Player controls and looping behave differently or have limitations depending on the platform and rendering method.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Add the VIBRATE permission to Android Manifest. For iOS, declare .ahap files as assets in pubspec.yaml if used.
import 'package:advanced_haptics/advanced_haptics.dart';
final bool hasSupport = await AdvancedHaptics.hasCustomHapticsSupport();
if (hasSupport) {
await AdvancedHaptics.success();
}Alternatives
Packages that do the same job and could replace advanced_haptics.
- gaimon
A Flutter plugin to support haptic feedback with custom patterns.
83Compare - flutter_vibrate
A Flutter plugin to trigger haptic feedback and vibrations on iOS and Android.
71Compare - haptic_kit
Haptic feedback, vibration and animated haptic widgets for Flutter on Android and iOS.
80Compare - haptic_feedback
A plugin for consistent haptic feedback patterns across iOS and Android.
91Compare
Works with
Packages commonly used together with advanced_haptics: ones it builds on, ones built on it, and its own family.