Skip to content

HardwareDeviceManager

A DeviceManager for a hardware device with a battery.

Adds the battery level (batteryLevel) and battery events (batteryEvents).

Inheritance
Implementers

Constructors

HardwareDeviceManager

HardwareDeviceManager<TDeviceConfiguration extends DeviceConfiguration<TRegistration>, TRegistration extends DeviceRegistration>(
  1. String deviceType, {
  2. TDeviceConfiguration? configuration,
})

Properties

batteryEvents

Stream<int> get batteryEvents

The battery level (0-100) of this hardware device, each time it changes.

Empty by default.

batteryLevel

int? get batteryLevel

The runtime battery level of this hardware device in percent (0-100). Returns null if unknown.