SceneRecall.fromJson constructor
Creates a SceneRecall object from the JSON response to a GET request.
Implementation
factory SceneRecall.fromJson(Map<String, dynamic> dataMap) {
return SceneRecall(
action: dataMap[ApiFields.action] ?? "",
status: dataMap[ApiFields.status] ?? "",
duration: dataMap[ApiFields.duration] ?? 0,
dimming: LightDimming.fromJson(
Map<String, dynamic>.from(dataMap[ApiFields.dimming] ?? {})),
);
}