AdaptiveHaptics class

Plays platform-adaptive haptic feedback.

Created via Pulsar.createAdaptiveHaptics. Example:

final pulsar = Pulsar();
final adaptive = await pulsar.createAdaptiveHaptics(AdaptivePreset(
  ios: AdaptivePresetCallback(() => pulsar.presets.systemImpactMedium()),
  android: AdaptivePresetPattern(myPattern),
));

await adaptive.play();
// …
await adaptive.dispose();

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

dispose() Future<void>
Release the underlying native resources.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
play() Future<void>
Trigger the platform-appropriate haptic feedback.
stop() Future<void>
Stop an in-progress pattern-based haptic. No-op for callback configs.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited