HapticEvent class

Represents a single haptic event in a pattern.

Constructors

HapticEvent({required HapticEventType type, required double intensity, required double sharpness, required double time, double? duration})
const
HapticEvent.continuous({required double time, required double duration, double intensity = 1.0, double sharpness = 0.5})
Creates a continuous haptic event (with duration).
factory
HapticEvent.transient({required double time, double intensity = 1.0, double sharpness = 0.5})
Creates a transient haptic event (like a tap).
factory

Properties

duration → double?
The duration of the event (only for continuous events).
final
hashCode → int
The hash code for this object.
no setterinherited
intensity → double
The intensity of the haptic (0.0 to 1.0).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sharpness → double
The sharpness of the haptic (0.0 to 1.0).
final
time → double
The time at which this event should occur (in seconds).
final
type → HapticEventType
The type of haptic event.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this event to a JSON-compatible map.
toString() → String
A string representation of this object.
inherited

Operators

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