LightColorTemperatureDelta.fromJson constructor

LightColorTemperatureDelta.fromJson(
  1. Map<String, dynamic> dataMap
)

Creates a LightColorTemperatureDelta object from the JSON response to a GET request.

Implementation

factory LightColorTemperatureDelta.fromJson(Map<String, dynamic> dataMap) {
  return LightColorTemperatureDelta(
    action: LightColorTemperatureDeltaAction.fromString(
        dataMap[ApiFields.action] ?? ""),
    delta: dataMap[ApiFields.mirekDelta],
  );
}