HapticChoreographer class
Schedules and plays back a HapticPattern pulse by pulse, through
fireHaptic (so every existing hapticsEnabled/hapticSoftMode
contract already applies to every pulse, for free — this never calls
HapticFeedback.* directly).
playing a new pattern always cancels whatever pattern is still running first — never stacks multiple patterns' pulses on top of each other, which is what actually rate-limits a "rage tap" spamming play: at most 1 pattern's pulses are ever in flight, no matter how often play is called.
Constructors
- HapticChoreographer({void fire(HapticLevel level)?, Timer createTimer(Duration delay, void callback())?})
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
-
cancel(
) → void -
Stops whatever pattern is currently playing (a no-op if none is).
Safe to call from
dispose()— leaves no pending timer behind. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
play(
HapticPattern pattern) → void -
Plays
patternfrom its first pulse, cancelling any pattern still in progress. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited