AdvancedHaptics class
A Flutter plugin for playing powerful, custom haptic feedback patterns.
This class provides a unified API to access Android's VibrationEffect.createWaveform
and iOS's Core Haptics, enabling fine-grained control over tactile feedback.
Constructors
Properties
- hashCode → int
- 
  The hash code for this object.
  no setterinherited
- runtimeType → Type
- 
  A representation of the runtime type of the object.
  no setterinherited
Methods
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a nonexistent method or property is accessed.
  inherited
- 
  toString() → String 
- 
  A string representation of this object.
  inherited
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  inherited
Static Methods
- 
  cancel() → Future< void> 
- Cancels the haptic player immediately, ignoring any scheduled events.
- 
  error({List< int> timings = const [0, 100, 50, 100], List<int> amplitudes = const [255, 0, 200, 0]}) → Future<void> 
- Plays an error-like feedback with two longer buzzes.
- 
  hasCustomHapticsSupport() → Future< bool> 
- Checks if the device supports custom haptics.
- 
  heavyRumble({List< int> timings = const [0, 200], List<int> amplitudes = const [255, 0]}) → Future<void> 
- Plays a strong, short "heavy rumble" haptic.
- 
  lightTap({List< int> timings = const [0, 30], List<int> amplitudes = const [180, 0]}) → Future<void> 
- Plays a quick, light tap haptic feedback.
- 
  mediumTap({List< int> timings = const [0, 50], List<int> amplitudes = const [200, 0]}) → Future<void> 
- Plays a medium-strength haptic tap.
- 
  pause({double atTime = 0.0}) → Future< void> 
- Pauses the currently active haptic player.
- 
  playAhap(String ahapPath, {double atTime = 0.0}) → Future< void> 
- Plays a custom haptic pattern from an .ahap file on iOS.
- 
  playPredefined(AndroidPredefinedHaptic effect) → Future< void> 
- Plays a predefined haptic pattern on Android (API 29+). Ignored on iOS.
- 
  playWaveform(List< int> timings, List<int> amplitudes, {double atTime = 0.0}) → Future<void> 
- Plays a haptic pattern defined by timings and amplitudes.
- 
  resume({double atTime = 0.0}) → Future< void> 
- Resumes a paused haptic player.
- 
  seek({required double offset}) → Future< void> 
- Seeks to a specific point in the active haptic pattern.
- 
  selectionClick({List< int> timings = const [0, 20], List<int> amplitudes = const [120, 0]}) → Future<void> 
- Plays a short, crisp selection click haptic.
- 
  stop({double atTime = 0.0}) → Future< void> 
- Stops any currently playing haptic pattern.
- 
  success() → Future< void> 
- Plays a simple, predefined "success" haptic.
- 
  successBuzz({List< int> timings = const [0, 50, 100, 50], List<int> amplitudes = const [255, 0, 255, 0]}) → Future<void> 
- Plays a double-tap success haptic pattern.