LightDimmingFull.fromJson constructor

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

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

Implementation

factory LightDimmingFull.fromJson(Map<String, dynamic> dataMap) {
  return LightDimmingFull(
    brightness: ((dataMap[ApiFields.brightness] ?? 0.0) as num).toDouble(),
    minDimLevel: ((dataMap[ApiFields.minDimLevel] ?? 0.0) as num).toDouble(),
  );
}