DevicePowerPowerState.fromJson constructor
Creates a DevicePowerPowerState object from the JSON response to a GET request.
Implementation
factory DevicePowerPowerState.fromJson(Map<String, dynamic> dataMap) {
return DevicePowerPowerState(
batteryState: dataMap[ApiFields.batteryState] ?? "",
batteryLevel: dataMap[ApiFields.batteryLevel] ?? 0,
);
}