Device class

Wraps DeviceState and Toolchain, providing an interface to control devices.

Constructors

Device({required DeviceState state, required Toolchain toolchain})

Properties

hashCode int
The hash code for this object.
no setterinherited
platform ↔ PlatformDevice
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state DeviceState
no setter
toolchain Toolchain
final

Methods

boot() Future<void>
Boot the device
cleanStatusBar() Future<void>
Clean the status bar for screenshots
clone([DeviceState modifyState(DeviceState s)?]) Device
maybeResolveName() Future<void>
Maybe map the device id back to the device name
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
safeBoot({Duration shutdownTimeout = const Duration(seconds: 30)}) → ZIO<Scope<NoEnv>, DeviceError, Device>
screenshot() Future<List<int>>
Take a screenshot of the device
shutdown() Future<void>
Shutdown the device
similar(DeviceState other) bool
Returns true if the device is similar to the given DeviceState.
toString() String
A string representation of this object.
inherited
waitUntilRunning({Duration timeout = const Duration(seconds: 100)}) Future<void>
Waits until the Device is running, or errors with a timeout.

Operators

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

Static Properties

list → ZIO<Toolchain, Never, IList<Device>>
final
shutdownAll → ZIO<Toolchain, DeviceError, Unit>
final

Static Methods

forEach({required Future<void> process(Device device), required Iterable<String> nameOrIds, Duration bootTimeout = const Duration(minutes: 3), Duration shutdownTimeout = const Duration(seconds: 15)}) → RIO<Toolchain, Unit>