Light.fromJSON constructor
Implementation
Light.fromJSON(Map<String, dynamic> json, Map<String, dynamic> rootJSON) : super.fromJSON(json, rootJSON) {
if (json["color"] != null) {
color = Color(0, 0, 0).setHex(json["color"]);
}
intensity = json["intensity"] ?? 1;
}