LightDimming.fromJson constructor

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

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

Implementation

factory LightDimming.fromJson(Map<String, dynamic> dataMap) {
  return LightDimming(
    brightness: dataMap[ApiFields.brightness] ?? 0.0,
  );
}