InMemoryDeviceAdapter class

Pure-Dart default adapter (test/dev): scriptable status + lifecycle.

Implemented types

Constructors

InMemoryDeviceAdapter({DeviceInfo deviceInfo = DeviceInfo.unknown, DeviceStatus deviceStatus = const DeviceStatus()})

Properties

deviceInfo ↔ DeviceInfo
The info info() reports.
getter/setter pair
deviceStatus ↔ DeviceStatus
The status status() reports.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
lifecycle ↔ AppLifecycleState2
The current app lifecycle state.
getter/setter pairoverride-getter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

emitLifecycle(AppLifecycleState2 state) → void
Simulates a lifecycle transition (the OS callback).
info() → Future<DeviceInfo>
Static device/environment info (cached by adapters).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onLifecycleChanged(void listener(AppLifecycleState2 state)) → void Function()
Subscribes to lifecycle changes; returns an unsubscribe function.
override
status() → Future<DeviceStatus>
Current connectivity + power status.
override
toString() → String
A string representation of this object.
inherited

Operators

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