LightEffects.fromJson constructor
Creates a LightEffects object from the JSON response to a GET request.
Implementation
factory LightEffects.fromJson(Map<String, dynamic> dataMap) {
return LightEffects(
effect: dataMap[ApiFields.effect] ?? "",
effectValues: List<String>.from(dataMap[ApiFields.effectValues] ?? []),
status: dataMap[ApiFields.status] ?? "",
statusValues: List<String>.from(dataMap[ApiFields.statusValues] ?? []),
);
}