MockDevice class
A mock wearable device that simulates a real pair of Ray-Ban Meta glasses.
Obtain via MockDeviceKit.pairDevice.
Properties
- deviceId → String
-
The unique ID of this mock device (matches WearableDevice.id).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
doff(
) → Future< void> - Simulate the user taking off the glasses (doff). Streaming pauses when the device is doffed.
-
don(
) → Future< void> - Simulate the user putting on the glasses (don). This makes the device active and able to stream.
-
fold(
) → Future< void> - Simulate folding the glasses hinges (streaming stops).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
powerOff(
) → Future< void> - Power off this mock device.
-
powerOn(
) → Future< void> - Power on this mock device.
-
setCameraFeed(
String assetPath) → Future< void> - Set a video file as the mock camera stream feed.
-
setCapturedImage(
String assetPath) → Future< void> - Set a static image as the result returned by CameraStream.capturePhoto.
-
tapAndHoldCaptouch(
) → Future< void> - Simulate a tap-and-hold gesture, which stops an active stream.
-
tapCaptouch(
) → Future< void> - Simulate a single capacitive touch tap on the glasses frame. This toggles pause/resume on an active stream.
-
toString(
) → String -
A string representation of this object.
inherited
-
unfold(
) → Future< void> - Simulate unfolding the glasses hinges.
-
unpair(
) → Future< void> - Unpair this mock device (removes it from the device list).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited