FakeAiroHapticPlatform class

Fake implementation of AiroHapticsPlatform for unit and widget testing.

Inheritance

Constructors

FakeAiroHapticPlatform({AiroHapticCapabilities capabilities = const AiroHapticCapabilities.full(platform: AiroHapticDevicePlatform.ios, backend: 'fake_test_backend')})

Properties

capabilities ↔ AiroHapticCapabilities
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
invocations → List<HapticInvocation>
final
isStopped ↔ bool
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
settings ↔ AiroHapticSettings
getter/setter pair

Methods

clearInvocations() → void
expectHapticPatternPlayed(String patternId) → void
Helper assertion: verifies a pattern with id patternId was played.
expectHapticPlayed(AiroHapticFeedbackType type) → void
Helper assertion: verifies a semantic feedback type was performed.
expectNoHapticPlayed() → void
Helper assertion: verifies no haptic feedback was triggered.
getCapabilities() → Future<AiroHapticCapabilities>
Returns device haptic capabilities.
override
getDiagnostics() → Future<AiroHapticDiagnostics>
Fetches runtime diagnostics from the native engine.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
performFeedback(AiroHapticFeedbackType type, {AiroHapticOptions? options}) → Future<void>
Performs a semantic haptic feedback.
override
performImpact(AiroHapticImpact impact, {double? intensity, AiroHapticOptions? options}) → Future<void>
Performs physical impact feedback.
override
playPattern(AiroHapticPattern pattern, {AiroHapticOptions? options}) → Future<void>
Plays a composite haptic pattern.
override
stopAll() → Future<void>
Stops all currently active haptic feedback.
override
stopPattern(String patternId) → Future<void>
Stops playback of a specific pattern by ID.
override
toString() → String
A string representation of this object.
inherited
updatePattern(String patternId, double intensity, double sharpness) → Future<void>
Dynamically updates intensity and sharpness of an active pattern player.
override
updateSettings(AiroHapticSettings settings) → Future<void>
Updates engine settings across the native channel.
override

Operators

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