LightColorXy.fromJson constructor

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

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

Implementation

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