DevicePowerPowerState class

The device's power state.

Constructors

DevicePowerPowerState({required String batteryState, required int batteryLevel})
Creates a DevicePowerPowerState object.
DevicePowerPowerState.empty()
Creates an empty DevicePowerPowerState object.
DevicePowerPowerState.fromJson(Map<String, dynamic> dataMap)
Creates a DevicePowerPowerState object from the JSON response to a GET request.
factory

Properties

batteryLevel int
The current battery state in percent, only for battery powered devices.
final
batteryState String
Status of the power source of a device, only for battery powered devices.
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({String? batteryState, int? batteryLevel}) DevicePowerPowerState
Returns a copy of this object with its field values replaced by the ones provided to this method.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this object into JSON format.
toString() String
A string representation of this object.
override

Operators

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